Skip to content

feat: add plugin interface (#371)#417

Open
zhongkechen wants to merge 1 commit into
mainfrom
otel3
Open

feat: add plugin interface (#371)#417
zhongkechen wants to merge 1 commit into
mainfrom
otel3

Conversation

@zhongkechen
Copy link
Copy Markdown
Contributor

@zhongkechen zhongkechen commented Jun 4, 2026

Issue #, if available:

fix: #386

Description of changes:

initial implementation of Otel plugin

  • start an invocation span when an invocation starts and end it when the invocation completes
  • start an operation span when an operation is started and end it when the operation completes or the invocation completes.

Know issues

  • not implemented: start and end an operation span when an operation is changed to terminal status when replay, and link the span to the previous span for the same operation
  • onOperationStart is called multiple times for Step operation if it's retried
  • the attempt is always None for CONTEXT, leading to missing initial span for context operations

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

"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"opentelemetry-exporter-otlp",
"opentelemetry-propagator-aws-xray",
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.

Not sure if these dependencies are required. If not, we can add them to the dependencies of example package

@zhongkechen zhongkechen force-pushed the otel3 branch 3 times, most recently from 171fa60 to 875a7df Compare June 4, 2026 18:47
)
except subprocess.CalledProcessError:
logger.exception("Failed to install runtime dependencies")
return False
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.

This would break local building of the package on MacOs if any of the dependencies rely on native extensions

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.

For now it seems OK. OTel doesn't have native extensions.

@zhongkechen zhongkechen marked this pull request as ready for review June 4, 2026 18:55
@zhongkechen zhongkechen requested review from a team and SilanHe June 4, 2026 20:36
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.

[Feature]: Create an OTel plugin

1 participant