traceloop / traceloop/openllmetry

🚀 Feature: a programmatic way, e.g. via Traceloop.init(), not to try to send to the OpenTelemetry Metrics

Open
#1,646 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.4k
Forks
1.1k
Avg merge
8d 14h
Merged PRs (30d)
2

Description

Which component is this feature for?

Traceloop SDK

🔖 Feature description

A programmatic way, e.g. via Traceloop.init(), so app will not try to send to the OpenTelemetry Metrics, rather than needing to set env var like TRACELOOP_METRICS_ENABLED == false

🎤 Why is this feature needed ?

If the python app is never going to use TRACELOOP METRICS it would be cleaner to set that this programmatically rather than having to set a env variable in the container.

Otherwise error like following will be logged :

2024-07-22T14:48:51 ERROR opentelemetry.exporter.otlp.proto.http.metric_exporter Failed to export batch code: 404, reason: 404 page not found

✌️ How do you aim to achieve this?

A way to provide equivalent of TRACELOOP_METRICS_ENABLED == false env var via python code.

🔄️ Additional Information

Question raised per https://github.com/traceloop/openllmetry/discussions/1119#discussioncomment-10113050 ...

@nirga Is there any programmatic way via Traceloop.init() to tell openllmetry not to send to the OpenTelemetry Metrics, or it only possible via the TRACELOOP_METRICS_ENABLED environment ? Thanks!

Rely from @nirga ..

Currently only with the environment variable @k1eran. Can you open an issue for that? We'll take care of it

I am currently using env var approach from https://github.com/traceloop/openllmetry/discussions/1119#discussioncomment-9521026 when using jaeger for testing my tracing.

👀 Have you spent some time to check if this feature request has been raised before?
  • I checked and didn't find similar issue
Are you willing to submit PR?

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Traceloop.init() entry point and trace how TRACELOOP_METRICS_ENABLED is read and applied. Add the equivalent Python-level option so applications can disable OpenTelemetry Metrics without an environment variable, and verify that disabled metrics are not sent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.