-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Telemetry] use existed env variable instead of introducing new one #1251
base: main
Are you sure you want to change the base?
Conversation
222244b
to
c6165d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, matches env var used in telemetry code:
GenAIComps/comps$ git grep TELEMETRY | grep py:
__init__.py:if os.getenv("ENABLE_OPEA_TELEMETRY", "false").lower() == "true":
cores/telemetry/opea_telemetry.py:telemetry_endpoint = os.environ.get("TELEMETRY_ENDPOINT", "http://localhost:4318/v1/traces")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of enabling/disabling the tracing in comps/init.py, could we do this in the module comps.cores.telemetry.opea_telemetry.opea_telemetry
itself.
Doing a simple grep, I found other places just directly import the opea_telemetry.
$ grep -r 'import opea_telemetry' `find -name "*.py"`
./comps/__init__.py: from comps.cores.telemetry.opea_telemetry import opea_telemetry
./comps/rerankings/src/opea_reranking_microservice.py:from comps.cores.telemetry.opea_telemetry import opea_telemetry
./comps/embeddings/src/opea_embedding_microservice.py:from comps.cores.telemetry.opea_telemetry import opea_telemetry
./comps/cores/mega/orchestrator.py:from ..telemetry.opea_telemetry import opea_telemetry, tracer
./comps/llms/src/text-generation/opea_llm_microservice.py:from comps.cores.telemetry.opea_telemetry import opea_telemetry
Actually, we probably should remove all Telemetry Endpoint env variables from default compose.yaml and enable it only using an additional telemetry.yaml file. |
Signed-off-by: Tsai, Louie <[email protected]>
c6165d6
to
7568ece
Compare
I think this PR is not related whether we configure the tracing endpoint through environment variable or command line parameter(I'm fine to any of the option). My point is that we should disable the tracing by default, currently it assumes a tracing endpoint is available at localhost:4318 by default which will result connection refused errors even when users are not set any tracing related configurations: Below is the excerpt of container logs of the
|
There is code confliction. Please help to resolve it. @louie-tsai |
Description
Remove new environment variable and use existed one to disable/enable telemetry feature
PR#1168
Issues
NA
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
no
Tests
manually testing