Skip to content

Commit

Permalink
Correct template and exporter selection
Browse files Browse the repository at this point in the history
  • Loading branch information
keithralphs committed Feb 13, 2024
1 parent 54c8bd6 commit 59e56ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/blueapi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "{{ .Values.jaeger.otlp.host }}:{{ .Values.jaeger.otlp.port }}"
- name: OTEL_EXPORTER_OTLP_INSECURE
value: {{ .Values.jaeger.otlp.insecure }}
value: "{{ .Values.jaeger.otlp.insecure }}"
- name: OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST
value: {{ .Values.jaeger.otlp.request.headers }}
- name: OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE
Expand Down
4 changes: 2 additions & 2 deletions src/blueapi/tracing/tracing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def instrument_fastapi_app(app: FastAPI, name: str) -> None:
generation."""
resource = Resource(attributes={"service.name": name})
provider = TracerProvider(resource=resource)
provider.add_span_processor(BatchSpanProcessor(ConsoleSpanExporter()))
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
set_tracer_provider(provider)
FastAPIInstrumentor().instrument_app(app)


def set_console_exporter() -> None:
resource = Resource(attributes={"service.name": "BlueAPI"})
provider = TracerProvider(resource=resource)
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
provider.add_span_processor(BatchSpanProcessor(ConsoleSpanExporter()))


def get_tracer(name: str) -> Tracer:
Expand Down

0 comments on commit 59e56ee

Please sign in to comment.