Add recipe for zim32/symfony-tracing-core package (#1655)

* Add recipe for zim32/symfony-tracing-core package

* Fix yaml lint errors

* Fix yaml indentation

* Fix json indentation

* Change default exporter

* Fix yaml indentation

* Small changes to trigger pipeline
This commit is contained in:
zim32
2024-08-07 18:27:48 +02:00
committed by GitHub
parent 118b3e1805
commit ad2b97016d
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
tracing:
tracers:
# For each tracer defined here this bundle will create two services:
# 1) One which can be injected as TracerInterface $keyTracer
# 2) One which can be injected as ScopedTracerInterface $keyTracer
#
# F.e. http tracer can be injected as:
# TracerInterface $httpTracer
# ScopedTracerInterface $httpTracer
#
# Default tracer can be injected with any name. F.e.:
# TracerInterface $anyNameHere
#
# Usually other tracing bundles will add needed tracers automatically.
default: null
# You can pass additional "name" parameter which will be used when exporting spans for this tracer.
# By default, tracer name equals to tracer key.
# someTracer:
# name: Some custom tracer name
span_sampler:
# default sampling strategy
always_on: null
# always_off: null
# ratio:
# ratio: 0.5
# service:
# id: App\Service\TestSpanSampler
# expression:
# expression: "request.query.get('v') == '30'"
exporter:
# dummy exporter which uses logger to export spans
log:
service_name: tracing
level: debug
# otlp_http:
# endpoint: '%env(OTLP_EXPORTER_ENDPOINT)%'

View File

@@ -0,0 +1,11 @@
{
"bundles": {
"Zim\\SymfonyTracingCoreBundle\\SymfonyTracingCoreBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"env": {
"OTLP_EXPORTER_ENDPOINT": "http://some.domain.local:4318/v1/traces"
}
}