Skip to content

[Agent Server] Add OTLP protocol regression tests#48087

Draft
Shivakishore14 wants to merge 4 commits into
Azure:mainfrom
Shivakishore14:otlp-protocol-regression-tests
Draft

[Agent Server] Add OTLP protocol regression tests#48087
Shivakishore14 wants to merge 4 commits into
Azure:mainfrom
Shivakishore14:otlp-protocol-regression-tests

Conversation

@Shivakishore14

Copy link
Copy Markdown
Member

Description

Adds local, dependency-contract coverage for Agent Server OTLP protocol configuration:

  • hosts in-process HTTP/protobuf and gRPC OTLP receivers on loopback ports
  • initializes observability in a subprocess to isolate OpenTelemetry global providers
  • emits and verifies traces, metrics, and logs for both protocols
  • requires no Azure resources, Docker, or external collector

This draft depends on microsoft/opentelemetry-distro-python#224. With the currently published microsoft-opentelemetry==1.3.5, the HTTP/protobuf case passes and the gRPC case fails because HTTP exporters are still constructed. With the local distro fix, both cases pass. After the distro fix is released, this PR should raise the SDK minimum dependency to the fixed version.

Dependency: microsoft/opentelemetry-distro-python#224

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Validation

  • Published distro 1.3.5: HTTP/protobuf passes; gRPC fails as expected
  • Local distro fix: both protocol cases pass
  • azpysdk pylint .: passes

Use in-process HTTP/protobuf and gRPC receivers to verify traces, metrics, and logs through the public observability setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2ddb2a79-14d1-4372-a29d-8a0c65a55b7b
@github-actions github-actions Bot added the Hosted Agents sdk/agentserver/* label Jul 16, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Add Agent Server-managed OTLP gRPC exporter setup when customers configure OTEL_EXPORTER_OTLP_PROTOCOL=grpc, while leaving HTTP/protobuf export delegated to the Microsoft OpenTelemetry distro.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0c368201-b3c0-4a22-8311-2c288cbd374c
Apply Foundry enrichment during on_end and update the private attribute workaround for immutable BoundedAttributes so exported spans retain Agent Server metadata.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0c368201-b3c0-4a22-8311-2c288cbd374c
@Shivakishore14

Copy link
Copy Markdown
Member Author

/azp run python - pullrequest

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Keep span enrichment compatible with newer OpenTelemetry SDKs and tighten the OTLP gRPC exporter dependency to avoid slow resolver installs in apistub.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0c368201-b3c0-4a22-8311-2c288cbd374c
@Shivakishore14

Copy link
Copy Markdown
Member Author

/azp run python - pullrequest

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
No pipelines were found matching this branch/path.

@Shivakishore14

Copy link
Copy Markdown
Member Author

/azp run Azure SDK - Python - Pull Request

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hosted Agents sdk/agentserver/*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant