Skip to content

Commit

Permalink
add zipkin
Browse files Browse the repository at this point in the history
  • Loading branch information
xcodeassociated committed Sep 17, 2024
1 parent 757437b commit 948c0d4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ dependencies {
implementation 'org.springdoc:springdoc-openapi-starter-common:2.6.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'

// zipkin
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
implementation 'io.opentelemetry:opentelemetry-exporter-zipkin'
implementation 'io.zipkin.reporter2:zipkin-sender-urlconnection'

}
liquibase {
activities {
Expand Down
22 changes: 15 additions & 7 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ server.port=8082
spring.application.name=SoftenoJpaPostgresApp

### custom: external services

com.softeno.external.url=http://localhost:4500/sample
#com.softeno.external.url=http://localhost:8080/sample
#com.softeno.external.url=http://localhost:8080/sample-secured
Expand All @@ -14,7 +13,6 @@ com.softeno.kafka.rx=sample_topic_2
com.softeno.kafka.keycloak=keycloak-events

### jpa, hibernate & liquibase

spring.datasource.url=jdbc:postgresql://localhost:5432/application
spring.datasource.username=admin
spring.datasource.password=admin
Expand Down Expand Up @@ -44,7 +42,6 @@ logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE

### keycloak realm config: http://localhost:8090/realms/master/.well-known/openid-configuration

spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8090/realms/master
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:8090/realms/master/protocol/openid-connect/certs

Expand All @@ -58,27 +55,38 @@ spring.security.oauth2.client.provider.keycloak.user-info-uri=http://localhost:8
spring.security.oauth2.client.provider.keycloak.jwk-set-uri=http://localhost:8090/realms/master/protocol/openid-connect/certs

# kafka

spring.kafka.consumer.properties.spring.json.use.type.headers=false
spring.kafka.consumer.properties.spring.json.value.default.type=com.fasterxml.jackson.databind.JsonNode

# metrics, prometheus & actuator

management.endpoints.web.base-path=/actuator
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
management.endpoint.metrics.enabled=true
management.endpoint.prometheus.enabled=true

# swagger

springdoc.api-docs.enabled=true
springdoc.api-docs.path=/v3/api-docs
springdoc.swagger-ui.path=/swagger-ui.html

# resilience4j

resilience4j.circuitbreaker.metrics.enabled=true
resilience4j.retry.metrics.enabled=true
resilience4j.ratelimiter.metrics.enabled=true

## observation & zipkin
management.tracing.enabled=true
management.zipkin.tracing.endpoint=http://localhost:9411/api/v2/spans
management.tracing.sampling.probability=1.0
management.tracing.propagation.consume=b3
management.tracing.propagation.produce=b3
management.tracing.propagation.type=b3

spring.kafka.template.observation-enabled=true
spring.kafka.listener.observation-enabled=true
management.tracing.baggage.correlation.enabled=true
management.tracing.baggage.enabled=true
management.tracing.baggage.correlation.fields=spanId,traceId

management.otlp.metrics.export.enabled=true

0 comments on commit 948c0d4

Please sign in to comment.