Skip to content

Instantly share code, notes, and snippets.

View rsrini7's full-sized avatar
😃
Happy

Srinivasan Ragothaman rsrini7

😃
Happy
View GitHub Profile
@rsrini7
rsrini7 / tracability
Created April 27, 2024 13:53
tracability
https://betterprogramming.pub/tracing-in-spring-boot-3-webflux-d432d0c78d3e
logging.pattern.level: "trace_id=%mdc{traceId} span_id=%mdc{spanId} trace_flags=%mdc{traceFlags} %p"
https://spring.academy/guides/microservices-observability-reactive-spring-boot-3
----------------
https://azizulhaq-ananto.medium.com/how-to-handle-logs-and-tracing-in-spring-webflux-and-microservices-a0b45adc4610
@Component
@rsrini7
rsrini7 / conemu-split pan on startup
Created April 21, 2024 03:16
conemu-split pan on startup
cmd -cur_console:n
powershell -cur_console:s1TVn
bash -cur_console:s1THn
@rsrini7
rsrini7 / otel context propagation
Created March 10, 2024 12:49
otel context propagation
https://www.dynatrace.com/news/blog/distributed-tracing-with-w3c-trace-context-for-improved-end-to-end-visibility/
https://engineering.dynatrace.com/open-source/standards/w3c-trace-context/
https://aloisreitbauer.medium.com/trace-context-and-the-road-toward-trace-tool-interoperability-d4d56932369c
https://stackoverflow.com/questions/76620276/use-both-b3-and-w3c-trace-formats-in-trace-propagation-between-spring-boot-2-3
@rsrini7
rsrini7 / wiremock
Created February 11, 2024 14:57
wiremock
java -jar wiremock-jre8-standalone-2.35.jar --port 9999
ls -> __files and mappings folders
wiremock recorder ->
localhost:9999/__admin/recorder/
@rsrini7
rsrini7 / cloudwatch
Created February 19, 2023 11:10
aws cloudwatch
AWS CloudWatch
├── Metrics
│ ├── Custom Metrics
│ ├── EC2 Metrics
│ ├── RDS Metrics
│ ├── ELB Metrics
│ ├── Lambda Metrics
│ └── S3 Metrics
├── Alarms
│ ├── Actions
@rsrini7
rsrini7 / gist:ed15c37cf0075b99c705c26bde03c2cf
Created January 8, 2023 11:53
spring actuator and change log level at runtime
To use the Spring Actuator loggers endpoint in a traditional Spring application (i.e., one that does not use Spring Boot), you will need to do the following:
Add the spring-actuator dependency to your application.
Enable the loggers endpoint by adding the management.endpoint.loggers.enabled property to your application.properties file and setting it to true.
Configure the LoggersMvcEndpoint bean in your application context. This can be done by creating a configuration class that implements the ManagementConfigurer interface and overrides the configure method.
For example:
Copy code
@Configuration
public class ManagementConfig implements ManagementConfigurer {
@rsrini7
rsrini7 / Java_remote_debug
Last active September 18, 2022 00:48
Remote Debugging
We use a Socket Attaching Connector, which is enabled by default when the dt_socket transport is configured and the VM is running in the server debugging mode.
#Java Env Variable (Append $JAVA_OPTS or %JAVA_OPTS% if required)
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
#For Java 9 or above
Since Java 9.0 JDWP supports only local connections by default, add*:<port> to listen all interfaces
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 <AppJar>
#For java 1.5 to 1.8:
@rsrini7
rsrini7 / citrix_issue_fix_steps
Last active September 16, 2022 08:42
You have chosen not to trust… – Citrix Receiver and SSL error 61
Install Citrix for Linux from
https://www.citrix.com/en-in/downloads/workspace-app/linux/workspace-app-for-linux-latest.html
If Error:
You have not chosen to trust "entrust root certification authority-G2" the issuer of the server security certificate ssl error 61
Follow this step to resolve cert issue:
https://mikesmithers.wordpress.com/2018/06/08/you-have-chosen-not-to-trust-citrix-receiver-and-ssl-error-61-on-ubuntu/
in Gist :
@rsrini7
rsrini7 / aws-deepracer-ubuntu-local-installs
Last active July 14, 2022 04:11
AWS Deep Racer Ubuntu setup with NVIDIA setup
sudo apt update
sudo apt upgrade
nvidia-smi
sudo apt install nvidia-utils-515
nvidia-smi
sudo apt install nvidia-driver-515
sudo prime-select nvidia
nvidia-smi
sudo reboot
nvidia-smi
@rsrini7
rsrini7 / Main.java
Created May 28, 2022 06:52 — forked from kostanovych/Main.java
Simple example of compressing HTTP request via gzip with using Spring RestTemplate
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.HttpMessageConverterExtractor;
import org.springframework.web.client.RequestCallback;
import org.springframework.web.client.ResponseExtractor;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.nio.charset.StandardCharsets;