Slackbot
03/01/2023, 5:24 PMSrikanth Chekuri
03/02/2023, 12:28 AM1. Is there a way to provide headers in monitoring http endpoints? One of the endpoints that I want to monitor requires an authorisation header.Not currently supported now.
1. I am constantly seeing these errors in my otel-collector logs. Is this concerning? Can these be disabled somehow so I don’t miss the important logs?What language SDKs are you using? This happens when the metric temporality is delta. This shouldn’t happen unless you explicitly configure the SDKs to prefer delta as the spec recommended default is cumulative. If you didn’t change any SDK configuration let me know what SDK are you using otherwise you can use the cumulative temporality to not see this error.
Rohit Agrawal
03/02/2023, 9:42 AMSrikanth Chekuri
03/02/2023, 9:57 AMRohit Agrawal
03/02/2023, 10:44 AMFastAPIInstrumentor.instrument_app(app)
prometheus_instrumentor = Instrumentator(
should_group_status_codes=True,
should_ignore_untemplated=True,
should_respect_env_var=True,
should_instrument_requests_inprogress=True,
excluded_handlers=["/health", "/metrics"],
env_var_name="ENABLE_METRICS",
inprogress_name="http_requests_inprogress",
inprogress_labels=True,
)
prometheus_instrumentor.instrument(app).expose(app, include_in_schema=False)
In my environment variables ->
OTEL_RESOURCE_ATTRIBUTES=service.name=inventory,deployment.environment=stage,version=1.0.0
OTEL_EXPORTER_OTLP_ENDPOINT=<https://opentelemetryhttp.infra.kroozz.com>
OTEL_METRICS_EXPORTER=none
OTEL_PYTHON_FASTAPI_EXCLUDED_URLS=health,metrics
ENABLE_METRICS=true
SERVICE_NAME=inventory
ENVIRONMENT=stage
In my Dockerfile CMD ->
ENTRYPOINT ["opentelemetry-instrument", "--traces_exporter", "otlp_proto_http", "--metrics_exporter" ,"otlp_proto_http", "gunicorn", "app.main:app", "--workers", "2", "--worker-class", "uvicorn.workers.UvicornWorker","--bind", "0.0.0.0:8000"]
My opentelemetry http exporter is placed behind a load balancer, which handles the SSL configurationRohit Agrawal
03/03/2023, 1:01 PMSrikanth Chekuri
03/03/2023, 5:26 PM