File tree 5 files changed +35
-4
lines changed
5 files changed +35
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ load-data:
135
135
136
136
.PHONY : re-run
137
137
re-run : setup-environment wait-opensearch wait-database
138
- $(call run-command, opentelemetry-instrument --traces_exporter console --metrics_exporter console --logs_exporter console --service_name querido-diario-api python main)
138
+ $(call run-command, opentelemetry-instrument python main)
139
139
140
140
.PHONY : runshell
141
141
runshell :
@@ -193,7 +193,8 @@ start-otel-collector:
193
193
podman run -d --rm -ti \
194
194
--name $(OTEL_COLLECTOR_CONTAINER_NAME ) \
195
195
--pod $(POD_NAME ) \
196
- docker.io/otel/opentelemetry-collector-contrib:0.97.0
196
+ --volume $(PWD ) /config/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
197
+ docker.io/otel/opentelemetry-collector-contrib:0.97.0 " --config=/etc/otel-collector-config.yaml"
197
198
198
199
stop-otel-collector :
199
200
podman rm --force --ignore $(OTEL_COLLECTOR_CONTAINER_NAME )
Original file line number Diff line number Diff line change 16
16
from themed_excerpts import ThemedExcerptAccessInterface , ThemedExcerptAccessInterface
17
17
from themed_excerpts .themed_excerpt_access import ThemedExcerptRequest
18
18
19
- logging .basicConfig (level = logging .DEBUG )
20
19
logger = logging .getLogger (__name__ )
21
20
config = load_configuration ()
22
21
Original file line number Diff line number Diff line change
1
+ receivers :
2
+ otlp :
3
+ protocols :
4
+ grpc :
5
+ endpoint : 0.0.0.0:4317
6
+ exporters :
7
+ debug :
8
+ verbosity : detailed
9
+ processors :
10
+ batch :
11
+ service :
12
+ pipelines :
13
+ traces :
14
+ receivers : [otlp]
15
+ exporters : [debug]
16
+ processors : [batch]
Original file line number Diff line number Diff line change @@ -32,3 +32,17 @@ THEMED_EXCERPT_EMBEDDING_SCORE_FIELD=excerpt_embedding_score
32
32
THEMED_EXCERPT_TFIDF_SCORE_FIELD = excerpt_tfidf_score
33
33
THEMED_EXCERPT_FRAGMENT_SIZE = 10000
34
34
THEMED_EXCERPT_NUMBER_OF_FRAGMENTS = 1
35
+
36
+ OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED = true
37
+ OTEL_PYTHON_LOG_CORRELATION = true
38
+ OTEL_PYTHON_LOG_LEVEL = debug
39
+ OTEL_PYTHON_LOG_FORMAT = " %(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] [trace_id=%(otelTraceID)s span_id=%(otelSpanID)s resource.service.name=%(otelServiceName)s trace_sampled=%(otelTraceSampled)s] - %(message)s"
40
+ OTEL_SERVICE_NAME = querido-diario-api
41
+ OTEL_LOGS_EXPORTER = console,otlp
42
+ OTEL_TRACES_EXPORTER = console,otlp
43
+ OTEL_METRICS_EXPORTER = console,otlp
44
+ OTEL_EXPORTER_OTLP_INSECURE = true
45
+ OTEL_EXPORTER_OTLP_ENDPOINT = http://0.0.0.0:4317
46
+
47
+ # valor alto para não atrapalhar tanto a leitura dos logs durante o desenvolvimento
48
+ OTEL_METRIC_EXPORT_INTERVAL = 60000
Original file line number Diff line number Diff line change @@ -8,4 +8,5 @@ psycopg2==2.8.5
8
8
SQLAlchemy == 1.3.19
9
9
opensearch-py == 2.3.2
10
10
mailjet-rest == 1.3.4
11
- opentelemetry-distro == 0.44b0
11
+ opentelemetry-distro == 0.45b0
12
+ opentelemetry-exporter-otlp == 1.24.0
You can’t perform that action at this time.
0 commit comments