Skip to content

Commit

Permalink
configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Dec 23, 2024
1 parent 5d486b6 commit d5c7583
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions load_testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requirements:
- opentelemetry libraries

```bash
» uv pip install opentelemetry-api \
uv pip install opentelemetry-api \
opentelemetry-sdk \
opentelemetry-exporter-otlp \
opentelemetry-instrumentation-sqlalchemy \
Expand All @@ -25,19 +25,19 @@ requirements:


```bash
prefect config set PREFECT_API_URL=http://localhost:4200/api

» prefect config set PREFECT_API_URL=http://localhost:4200/api

» unset $(env | grep OTEL_ | cut -d= -f1)
unset $(env | grep OTEL_ | cut -d= -f1)
export OTEL_SERVICE_NAME=prefect-server
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_LOG_LEVEL=debug
export PREFECT__ENABLE_OSS_TELEMETRY=true
export PYTHONPATH=/Users/nate/github.com/prefecthq/prefect/src


» opentelemetry-instrument \
opentelemetry-instrument \
uvicorn \
--app-dir /Users/nate/github.com/prefecthq/prefect/src \
--factory prefect.server.api.server:create_app \
Expand Down
7 changes: 4 additions & 3 deletions src/prefect/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Import user-facing API
from typing import Any

import os
from prefect.deployments import deploy
from prefect.states import State
from prefect.logging import get_run_logger
Expand Down Expand Up @@ -49,9 +49,10 @@
)

# Configure telemetry
import prefect.telemetry.bootstrap
if not os.environ.get("PREFECT__ENABLE_OSS_TELEMETRY"):
import prefect.telemetry.bootstrap

prefect.telemetry.bootstrap.setup_telemetry()
prefect.telemetry.bootstrap.setup_telemetry()


from prefect._internal.compatibility.deprecated import (
Expand Down

0 comments on commit d5c7583

Please sign in to comment.