Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
7ea10df
add TRACING_SAMPLING_PROBABILITY to TracingSettings
bisgaard-itis Sep 25, 2025
246ed0d
replace collector sampling strategy
bisgaard-itis Sep 25, 2025
1fc5a30
add sampling probability to traefik
bisgaard-itis Sep 25, 2025
29c5cbc
improve test
bisgaard-itis Sep 25, 2025
8e3a187
add sampling based strategy to fast api tracing instrumentation
bisgaard-itis Sep 25, 2025
c3a7962
add test and sampling strategy to aiohttp tracing instrumentation
bisgaard-itis Sep 25, 2025
5c2ce1b
clean up tests
bisgaard-itis Sep 25, 2025
bbff3e4
correct env var value
bisgaard-itis Sep 25, 2025
641ca63
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Sep 26, 2025
fa76bef
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Sep 29, 2025
cf09512
create TracingData dataclass for carrying around tracing data
bisgaard-itis Sep 29, 2025
1e4583e
propagate fastapi instrumentatoin
bisgaard-itis Sep 29, 2025
604c818
small changes
bisgaard-itis Sep 29, 2025
f9200ae
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Sep 29, 2025
33e2023
propagate tracing-data throughout fastapi apps
bisgaard-itis Sep 29, 2025
405fa86
further propagate tracing_data
bisgaard-itis Sep 29, 2025
bbc5d12
further cleanup
bisgaard-itis Sep 29, 2025
d1aba9b
propagate tracing_data
bisgaard-itis Sep 29, 2025
8f711f8
fix pylint ignore
bisgaard-itis Sep 29, 2025
8e5605a
attach tracing_data to app in webserver
bisgaard-itis Sep 29, 2025
dbb4e64
fix test
bisgaard-itis Sep 29, 2025
0897ada
bugfix for aiohttp
bisgaard-itis Sep 29, 2025
2a00fff
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Sep 30, 2025
869c2a7
simplify tests
bisgaard-itis Sep 30, 2025
4883380
fix test for profiles span
bisgaard-itis Sep 30, 2025
7dd9918
remove profiled spans from codebase
bisgaard-itis Sep 30, 2025
40cc94a
implement aiohttp middleware to support TracerProvider
bisgaard-itis Oct 1, 2025
dc8ea56
further changes
bisgaard-itis Oct 1, 2025
709af0c
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 1, 2025
63ac26a
start porting the log instrumentation
bisgaard-itis Oct 1, 2025
11953ff
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 6, 2025
3674785
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 6, 2025
b4718a2
start factoring out TracingData
bisgaard-itis Oct 6, 2025
972eb59
refactor tracing_data creation
bisgaard-itis Oct 6, 2025
d9aff45
fix lifespan creator in fastapi
bisgaard-itis Oct 6, 2025
874a26f
refactor tracing_data creation in aiohttp case
bisgaard-itis Oct 6, 2025
dd1180d
fix which was not commited yesterday
bisgaard-itis Oct 7, 2025
4f2ffe7
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 7, 2025
209b01a
make TracingData frozen
bisgaard-itis Oct 7, 2025
a63d628
several fixes and cleanups
bisgaard-itis Oct 7, 2025
598f1b2
ensure settings are not passed when getting tracing data
bisgaard-itis Oct 7, 2025
c6f1c5f
several fixes
bisgaard-itis Oct 7, 2025
d2ed79c
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 7, 2025
d32f87e
minor fixes to be able to generate OAS
bisgaard-itis Oct 7, 2025
6ebc7a8
fix import - make pylint hapy
bisgaard-itis Oct 7, 2025
193e35a
fix
bisgaard-itis Oct 7, 2025
e6d5303
fix in dask sidecar
bisgaard-itis Oct 7, 2025
d2d21c8
Fix calls to create_application in webserver tests
bisgaard-itis Oct 7, 2025
4482f1d
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 7, 2025
884c07d
fix import in webserver
bisgaard-itis Oct 7, 2025
2bf0901
fix clusters keeper tests
bisgaard-itis Oct 7, 2025
2dc15df
fix imports and typechecks in aiohttp tracing
bisgaard-itis Oct 7, 2025
41f68a8
fix various test fixtures
bisgaard-itis Oct 7, 2025
2aa10fc
disable tracing in tests
bisgaard-itis Oct 7, 2025
a340f98
fix sidecars_client fixture
bisgaard-itis Oct 7, 2025
84049f3
fix initilaized_app fixture in autoscaling
bisgaard-itis Oct 7, 2025
4f3a5ac
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 7, 2025
eea9fe9
fex test fixture in RUT
bisgaard-itis Oct 7, 2025
efc359d
fix more tests in RUT
bisgaard-itis Oct 7, 2025
ef7c3d5
fix service lib tests
bisgaard-itis Oct 7, 2025
e8f90fb
minor fix in servicelib tracing
bisgaard-itis Oct 7, 2025
6a0cce0
several fixes
bisgaard-itis Oct 7, 2025
3cddbc2
fix aiohttp tracing tests
bisgaard-itis Oct 7, 2025
e70a02b
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 7, 2025
19057ae
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 8, 2025
e4c11e8
TracingData -> TracingConfig @GitHK
bisgaard-itis Oct 8, 2025
dfd4042
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 8, 2025
965c5c5
fix in dirv2 tracing_data -> tracing_config
bisgaard-itis Oct 8, 2025
435d2e2
cleanup in all the applications
bisgaard-itis Oct 8, 2025
02e1652
Follow up changes
bisgaard-itis Oct 8, 2025
9148c5e
@GitHK fixes
bisgaard-itis Oct 8, 2025
f680ac1
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 8, 2025
df734a4
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 9, 2025
933c752
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
mrnicegyu11 Oct 9, 2025
8b26424
clean up dynamic scheduler tracing
bisgaard-itis Oct 9, 2025
e125632
TRACING_SAMPLING_PROBABILITY -> TRACING_OPENTELEMETRY_SAMPLING_PROBAB…
bisgaard-itis Oct 9, 2025
15afd8e
add fixme
bisgaard-itis Oct 9, 2025
92815f2
fix typo
bisgaard-itis Oct 9, 2025
d41d64d
make pylint happy
bisgaard-itis Oct 9, 2025
00e643a
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 9, 2025
009d00c
Merge branch 'master' into 1090-implement-sampling-tracing-strategy
bisgaard-itis Oct 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env-devel
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE=2
TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT=http://opentelemetry-collector
TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT=http://jaeger:4318
TRACING_OPENTELEMETRY_COLLECTOR_PORT=4318
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE=100
TRACING_SAMPLING_PROBABILITY=1.0
TRAEFIK_SIMCORE_ZONE=internal_simcore_stack
TRASH_RETENTION_DAYS=7
TWILIO_ACCOUNT_SID=DUMMY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import SpanProcessor, TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.sdk.trace.sampling import ParentBased, TraceIdRatioBased
from settings_library.tracing import TracingSettings
from yarl import URL

Expand Down Expand Up @@ -100,7 +101,11 @@ def _startup(
)
raise RuntimeError(msg)
resource = Resource(attributes={"service.name": service_name})
trace.set_tracer_provider(TracerProvider(resource=resource))
sampler = ParentBased(
root=TraceIdRatioBased(tracing_settings.TRACING_SAMPLING_PROBABILITY)
)
tracer_provider = TracerProvider(resource=resource, sampler=sampler)
trace.set_tracer_provider(tracer_provider=tracer_provider)
tracer_provider: trace.TracerProvider = trace.get_tracer_provider()

tracing_destination: str = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import SpanProcessor, TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.sdk.trace.sampling import ParentBased, TraceIdRatioBased
from settings_library.tracing import TracingSettings
from starlette.middleware.base import BaseHTTPMiddleware
from yarl import URL
Expand Down Expand Up @@ -87,7 +88,11 @@ def _startup(tracing_settings: TracingSettings, service_name: str) -> None:
return
# Set up the tracer provider
resource = Resource(attributes={"service.name": service_name})
trace.set_tracer_provider(TracerProvider(resource=resource))
sampler = ParentBased(
root=TraceIdRatioBased(tracing_settings.TRACING_SAMPLING_PROBABILITY)
)
trace_provider = TracerProvider(resource=resource, sampler=sampler)
trace.set_tracer_provider(trace_provider)
global_tracer_provider = trace.get_tracer_provider()
assert isinstance(global_tracer_provider, TracerProvider) # nosec

Expand Down
79 changes: 72 additions & 7 deletions packages/service-library/tests/aiohttp/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# pylint: disable=unused-argument
# pylint: disable=unused-variable

import asyncio
import importlib
from collections.abc import Callable
from functools import partial
Expand Down Expand Up @@ -40,17 +41,23 @@ def set_and_clean_settings_env_vars(
monkeypatch.setenv(
"TRACING_OPENTELEMETRY_COLLECTOR_PORT", f"{tracing_settings_in[1]}"
)
sampling_probability_mocked = False
if tracing_settings_in[2]:
sampling_probability_mocked = True
monkeypatch.setenv("TRACING_SAMPLING_PROBABILITY", tracing_settings_in[2])
yield
if endpoint_mocked:
monkeypatch.delenv("TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT")
if port_mocked:
monkeypatch.delenv("TRACING_OPENTELEMETRY_COLLECTOR_PORT")
if sampling_probability_mocked:
monkeypatch.delenv("TRACING_SAMPLING_PROBABILITY")


@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
],
indirect=True,
)
Expand All @@ -72,9 +79,9 @@ async def test_valid_tracing_settings(
@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 80),
("opentelemetry-collector", 4318),
("httsdasp://ot@##el-collector", 4318),
("http://opentelemetry-collector", 80, 1.0),
("opentelemetry-collector", 4318, 1.0),
("httsdasp://ot@##el-collector", 4318, 1.0),
],
indirect=True,
)
Expand Down Expand Up @@ -111,14 +118,14 @@ def manage_package(request):
"tracing_settings_in, manage_package",
[
(
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
(
"opentelemetry-instrumentation-botocore",
"opentelemetry.instrumentation.botocore",
),
),
(
("http://opentelemetry-collector", "4318"),
("http://opentelemetry-collector", "4318", 1.0),
(
"opentelemetry-instrumentation-aiopg",
"opentelemetry.instrumentation.aiopg",
Expand Down Expand Up @@ -157,7 +164,7 @@ async def test_tracing_setup_package_detection(
@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
],
indirect=True,
)
Expand Down Expand Up @@ -201,3 +208,61 @@ async def handler(handler_data: dict, request: web.Request) -> web.Response:
assert (
trace_id == handler_data[_OSPARC_TRACE_ID_HEADER]
) # Ensure trace IDs match


@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318, 0.05),
],
indirect=True,
)
async def test_tracing_sampling_probability_effective(
mock_otel_collector: InMemorySpanExporter,
aiohttp_client: Callable,
set_and_clean_settings_env_vars: Callable[[], None],
tracing_settings_in,
):
"""
This test checks that the TRACING_SAMPLING_PROBABILITY setting in TracingSettings
is effective by sending 1000 requests and verifying that the number of collected traces
is close to 0.05 * 1000 (with some tolerance).
"""
n_requests = 1000
tolerance_probability = 0.5

app = web.Application()
service_name = "simcore_service_webserver"
tracing_settings = TracingSettings()

async def handler(request: web.Request) -> web.Response:
return web.Response(text="ok")

app.router.add_get("/", handler)

async for _ in get_tracing_lifespan(
app=app,
service_name=service_name,
tracing_settings=tracing_settings,
)(app):
client = await aiohttp_client(app)

async def make_request():
await client.get("/")

await asyncio.gather(*(make_request() for _ in range(n_requests)))
spans = mock_otel_collector.get_finished_spans()
trace_ids = set()
for span in spans:
if span.context is not None:
trace_ids.add(span.context.trace_id)
num_traces = len(trace_ids)
expected_num_traces = int(
tracing_settings.TRACING_SAMPLING_PROBABILITY * n_requests
)
tolerance = int(tolerance_probability * expected_num_traces)
assert (
expected_num_traces - tolerance
<= num_traces
<= expected_num_traces + tolerance
), f"Expected roughly {expected_num_traces} distinct trace ids, got {num_traces}"
83 changes: 72 additions & 11 deletions packages/service-library/tests/fastapi/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,24 @@ def set_and_clean_settings_env_vars(
monkeypatch.setenv(
"TRACING_OPENTELEMETRY_COLLECTOR_PORT", f"{tracing_settings_in[1]}"
)
sampling_probability_mocked = False
if tracing_settings_in[2]:
sampling_probability_mocked = True
monkeypatch.setenv("TRACING_SAMPLING_PROBABILITY", f"{tracing_settings_in[2]}")
yield
if endpoint_mocked:
monkeypatch.delenv("TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT")
if port_mocked:
monkeypatch.delenv("TRACING_OPENTELEMETRY_COLLECTOR_PORT")
if sampling_probability_mocked:
monkeypatch.delenv("TRACING_SAMPLING_PROBABILITY")


@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", "4318"),
("http://opentelemetry-collector", 4318, 1.0),
("http://opentelemetry-collector", "4318", 1.0),
],
indirect=True,
)
Expand All @@ -91,15 +97,16 @@ async def test_valid_tracing_settings(
@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 80),
("http://opentelemetry-collector", 1238712936),
("opentelemetry-collector", 4318),
("httsdasp://ot@##el-collector", 4318),
(" !@#$%^&*()[]{};:,<>?\\|`~+=/'\"", 4318),
("http://opentelemetry-collector", 80, 0.5),
("http://opentelemetry-collector", 1238712936, 0.5),
("opentelemetry-collector", 4318, 0.5),
("httsdasp://ot@##el-collector", 4318, 0.5),
(" !@#$%^&*()[]{};:,<>?\\|`~+=/'\"", 4318, 0.5),
# The following exceeds max DNS name length
(
"".join(random.choice(string.ascii_letters) for _ in range(300)),
"1238712936",
0.5,
), # noqa: S311
],
indirect=True,
Expand Down Expand Up @@ -143,14 +150,14 @@ def manage_package(request):
"tracing_settings_in, manage_package",
[
(
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
(
"opentelemetry-instrumentation-botocore",
"opentelemetry.instrumentation.botocore",
),
),
(
("http://opentelemetry-collector", "4318"),
("http://opentelemetry-collector", "4318", 1.0),
(
"opentelemetry-instrumentation-aiopg",
"opentelemetry.instrumentation.aiopg",
Expand Down Expand Up @@ -184,7 +191,7 @@ async def test_tracing_setup_package_detection(
@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
],
indirect=True,
)
Expand Down Expand Up @@ -233,7 +240,7 @@ async def handler(handler_data: dict):
@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318),
("http://opentelemetry-collector", 4318, 1.0),
],
indirect=True,
)
Expand Down Expand Up @@ -284,3 +291,57 @@ async def handler(handler_data: dict):
for span in spans
if span.context is not None and span.attributes is not None
)


@pytest.mark.parametrize(
"tracing_settings_in",
[
("http://opentelemetry-collector", 4318, 0.05),
],
indirect=True,
)
async def test_tracing_sampling_probability_effective(
mock_otel_collector: InMemorySpanExporter,
mocked_app: FastAPI,
set_and_clean_settings_env_vars: Callable[[], None],
tracing_settings_in: Callable[[], dict[str, Any]],
):
"""
This test checks that the TRACING_SAMPLING_PROBABILITY setting in TracingSettings
is effective by sending 1000 requests and verifying that the number of collected traces
is close to 0.05 * 1000 (with some tolerance).
"""
n_requests = 1000
tolerance_probability = 0.5

tracing_settings = TracingSettings()

async def handler():
return PlainTextResponse("ok")

mocked_app.get("/")(handler)

async for _ in get_tracing_instrumentation_lifespan(
tracing_settings=tracing_settings,
service_name="Mock-OpenTelemetry-Pytest",
)(app=mocked_app):
initialize_fastapi_app_tracing(mocked_app, add_response_trace_id_header=True)
client = TestClient(mocked_app)
for _ in range(n_requests):
client.get("/")
spans = mock_otel_collector.get_finished_spans()
trace_ids = set()
for span in spans:
if span.context is not None:
trace_ids.add(span.context.trace_id)
num_traces = len(trace_ids)
expected_num_traces = int(
tracing_settings.TRACING_SAMPLING_PROBABILITY * n_requests
)
# Allow a 50% tolerance due to randomness
tolerance = int(tolerance_probability * expected_num_traces)
assert (
expected_num_traces - tolerance
<= num_traces
<= expected_num_traces + tolerance
), f"Expected roughly {expected_num_traces} distinct trace ids, got {num_traces}"
4 changes: 4 additions & 0 deletions packages/settings-library/src/settings_library/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ class TracingSettings(BaseCustomSettings):
TRACING_OPENTELEMETRY_COLLECTOR_PORT: Annotated[
RegisteredPortInt, Field(description="Opentelemetry compatible collector port")
]
TRACING_SAMPLING_PROBABILITY: Annotated[
float,
Field(description="Probability of sampling traces (0.0 - 1.0)", ge=0.0, le=1.0),
]
2 changes: 0 additions & 2 deletions services/director/tests/unit/test_core_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def test_docker_container_env_sample(monkeypatch: pytest.MonkeyPatch):
SWARM_STACK_NAME=master-simcore
TERM=xterm
TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT=http://jaeger:4318
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE=50
TRAEFIK_SIMCORE_ZONE=master_internal_simcore_stack
VIRTUAL_ENV=/home/scu/.venv
LOG_FORMAT_LOCAL_DEV_ENABLED=1
Expand Down Expand Up @@ -150,7 +149,6 @@ def test_docker_compose_environment_sample(
"STORAGE_ENDPOINT": "master_storage:8080",
"SWARM_STACK_NAME": "master-simcore",
"TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT": "http://jaeger:4318",
"TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE": "50",
"TRAEFIK_SIMCORE_ZONE": "master_internal_simcore_stack",
},
)
Expand Down
1 change: 0 additions & 1 deletion services/docker-compose-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ services:
- interactive_services_subnet
environment:
TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE: ${TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE}
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE: ${TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE}
TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT: ${TRACING_OPENTELEMETRY_COLLECTOR_EXPORTER_ENDPOINT}
volumes:
minio_data:
Expand Down
3 changes: 2 additions & 1 deletion services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ x-tracing-open-telemetry: &tracing_open_telemetry_environs
TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT: ${TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT}
TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE: ${TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE}
TRACING_OPENTELEMETRY_COLLECTOR_PORT: ${TRACING_OPENTELEMETRY_COLLECTOR_PORT}
TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE: ${TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE}
TRACING_SAMPLING_PROBABILITY: ${TRACING_SAMPLING_PROBABILITY}

x-webserver-diagnostics: &webserver_diagnostics_environs
DIAGNOSTICS_HEALTHCHECK_ENABLED: ${DIAGNOSTICS_HEALTHCHECK_ENABLED}
Expand Down Expand Up @@ -1503,6 +1503,7 @@ services:
- "--tracing.addinternals"
- "--tracing.otlp=true"
- "--tracing.otlp.http=true"
- "--tracing.sampleRate=${TRACING_SAMPLING_PROBABILITY}"
healthcheck:
# NOTE: this healthcheck to check if traefik is up and running must be run on the ping entrypoint defined in command!
test: traefik healthcheck --ping --ping.entryPoint=ping --entryPoints.ping.address=:9082
Expand Down
2 changes: 1 addition & 1 deletion services/opentelemetry-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ processors:
timeout: 5s
send_batch_size: ${TRACING_OPENTELEMETRY_COLLECTOR_BATCH_SIZE}
probabilistic_sampler:
sampling_percentage: ${TRACING_OPENTELEMETRY_COLLECTOR_SAMPLING_PERCENTAGE}
sampling_percentage: 100
filter/drop_healthcheck:
error_mode: ignore
traces:
Expand Down
Loading