Skip to content

chore: update otel readme, plugin constructor#490

Merged
wangyb-A merged 2 commits into
mainfrom
otel_readme
Jun 25, 2026
Merged

chore: update otel readme, plugin constructor#490
wangyb-A merged 2 commits into
mainfrom
otel_readme

Conversation

@wangyb-A

@wangyb-A wangyb-A commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

  • Add readme for otel plugin
  • Update otel plugin provider parameter as optional
  • Remove sample rate in the constructor (pass via env variable)
  • Rename the plugin to OTel

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@wangyb-A wangyb-A marked this pull request as ready for review June 24, 2026 23:20
Comment thread packages/aws-durable-execution-sdk-python-otel/README.md Outdated
Comment thread packages/aws-durable-execution-sdk-python-otel/README.md Outdated

- `otel_trace_id`: 32-char hex trace identifier
- `otel_span_id`: 16-char hex span identifier
- `otel_trace_sampled`: boolean indicating if the trace is sampled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the customer specifies th sampling ratio on the layer's env variable, will this be accurate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess this is for sample ratio, it's removed from the constructor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since the sampled ratio was removed from constructor and we're relying on the ADOT's env variable to specify the sampler as well as the ratio of traces sampled (see here), I was curious whether this would actually work. Since the sampling_rate was still included in the constructor, I assume there was a time where the sampling decision was implemented within this plugin.

I think it would. Seems the log filter is logging this based on a variable in the span context which I think is set by the Sampler.

https://github.com/aws/aws-durable-execution-sdk-python/blob/55b8e386a9439184a8cfdb598e698ae9bbf6704a/packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel/log_filter.py#L58C41-L60C14

https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html#opentelemetry.trace.TraceFlags

Comment on lines +159 to +160
| `OTEL_TRACES_SAMPLER` | Sampler to use (e.g., `traceidratio` for ratio-based sampling) | `always_on` |
| `OTEL_TRACES_SAMPLER_ARG` | Argument for the sampler (e.g., `0.3` to sample 30% of traces) | — |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see here


- `otel_trace_id`: 32-char hex trace identifier
- `otel_span_id`: 16-char hex span identifier
- `otel_trace_sampled`: boolean indicating if the trace is sampled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since the sampled ratio was removed from constructor and we're relying on the ADOT's env variable to specify the sampler as well as the ratio of traces sampled (see here), I was curious whether this would actually work. Since the sampling_rate was still included in the constructor, I assume there was a time where the sampling decision was implemented within this plugin.

I think it would. Seems the log filter is logging this based on a variable in the span context which I think is set by the Sampler.

https://github.com/aws/aws-durable-execution-sdk-python/blob/55b8e386a9439184a8cfdb598e698ae9bbf6704a/packages/aws-durable-execution-sdk-python-otel/src/aws_durable_execution_sdk_python_otel/log_filter.py#L58C41-L60C14

https://opentelemetry-python.readthedocs.io/en/stable/api/trace.html#opentelemetry.trace.TraceFlags

Comment thread packages/aws-durable-execution-sdk-python-otel/README.md Outdated
@wangyb-A wangyb-A merged commit 893268f into main Jun 25, 2026
69 checks passed
@wangyb-A wangyb-A deleted the otel_readme branch June 25, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants