Skip to content
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

Document some quirks with Python otel operator based auto-instrumentation #5338

Merged
merged 16 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion content/en/docs/kubernetes/operator/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,16 @@ spec:
instrumentation>
```

See the
[Python agent configuration docs](/docs/zero-code/python/configuration/#disabling-specific-instrumentations)
for more details.

#### Learn more {#python-learn-more}

[See the Python agent Configuration docs for more details.](/docs/zero-code/python/configuration/#disabling-specific-instrumentations)
For Python-specific quirks, see
[Python OpenTelemetry Operator docs](/docs/zero-code/python/operator/#python-specific-topics)
and the
[Python agent configuration docs](/docs/zero-code/python/configuration/).

### Go

Expand Down
17 changes: 16 additions & 1 deletion content/en/docs/zero-code/python/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,26 @@ title: Using the OpenTelemetry Operator to Inject Auto-Instrumentation
linkTitle: Operator
aliases: [/docs/languages/python/automatic/operator]
weight: 30
cSpell:ignore: distro mkdir uninstrumented virtualenv
cSpell:ignore: distro grpcio mkdir psutil uninstrumented virtualenv
---

If you run your Python service in Kubernetes, you can take advantage of the
[OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator)
to inject auto-instrumentation without having to modify each of your services
directly.
[See the OpenTelemetry Operator Auto-instrumentation docs for more details.](/docs/kubernetes/operator/automatic/)

### Python-specific topics

#### Libraries with binary wheels

Some Python packages we instrument or need in our instrumentation libraries,
might ship with some binary code. This is the case, for example, of `grpcio` and
`psutil` (used in `opentelemetry-instrumentation-system-metrics`).
Comment on lines +19 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some Python packages we instrument or need in our instrumentation libraries,
might ship with some binary code. This is the case, for example, of `grpcio` and
`psutil` (used in `opentelemetry-instrumentation-system-metrics`).
Some Python packages we instrument or need in our instrumentation libraries
might ship with some binary code. This is the case, for example, with `grpcio` and
`psutil`, which are used in `opentelemetry-instrumentation-system-metrics`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only psutil is used in the system metrics package, grpcio is used generally in the exporters or in its own instrumentation library.


The binary code is tied to a specific C library version (glibc or musl) and to a
specific Python version. The
[OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator)
provides images for a single Python version based on the glibc C library. If you
want to use it you might need to build your own image operator Docker image for
Python auto-instrumentation.
Comment on lines +27 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
want to use it you might need to build your own image operator Docker image for
Python auto-instrumentation.
want to use it, you might need to build your own image operator Docker image for
Python autoinstrumentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's spelled auto-instrumentation in other places

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly we have an issue for fixing that at once, I think it is fine to keep it that way