Skip to content

Configure OpenTelemetry activity source and service names - #1550

Merged
StefH merged 4 commits into
masterfrom
copilot/add-env-variable-support
Nov 24, 2026
Merged

StefH merged 4 commits into
masterfrom
copilot/add-env-variable-support

Conversation

@StefH

@StefH StefH commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

WireMock instances currently export telemetry under the same name, making them difficult to distinguish. This change adds a configurable name while preserving the default WireMock.Net behavior.

  • Configuration: Add OpenTelemetryOptions.ActivitySourceName, configurable through CLI arguments or environment variables.
  • Instrumentation: Subscribe to both the configured source and WireMock’s built-in source. Use the configured name as the exported service name.
  • Documentation: Describe configuration and update the minimum .NET version to 8.0.

For standalone or Docker deployments:

WireMockServerSettings__OpenTelemetryEnabled=true
WireMockServerSettings__OpenTelemetryActivitySourceName=MyService

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@StefH StefH changed the title [WIP] Add support for passing ENV variable for Otel Activity Name Configure OpenTelemetry activity source and service names Nov 24, 2026
@StefH StefH added the feature label Nov 24, 2026
Comment thread README.md
* gRPC / ProtoBuf support
* OpenAPI support
* OpenTelemetry support
* [OpenTelemetry support](src/WireMock.Net.OpenTelemetry/README.md), including configurable service names for standalone and Docker instances

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just keep the link. do not add extra text

@StefH
StefH marked this pull request as ready for review November 24, 2026 18:30
@sonarqubecloud

Copy link
Copy Markdown

This was referenced Nov 30, 2026
hangy pushed a commit to hangy/NLog.Targets.ApplicationInsights that referenced this pull request Dec 1, 2026
Updated [WireMock.Net](https://github.com/wiremock/WireMock.Net) from
2.21.0 to 2.35.0.

<details>
<summary>Release notes</summary>

_Sourced from [WireMock.Net's
releases](https://github.com/wiremock/WireMock.Net/releases)._

## 2.35.0

## What's Changed
* Upgrade NJsonSchema.Extensions & NSwag.Core by @​StefH in
wiremock/WireMock.Net#1552


**Full Changelog**:
wiremock/WireMock.Net@2.34.0...2.35.0

## 2.34.0

## What's Changed
* Update Scriban.Signed to 7.6.1 by @​StefH in
wiremock/WireMock.Net#1551


**Full Changelog**:
wiremock/WireMock.Net@2.33.0...2.34.0

## 2.33.0

## What's Changed
* Configure OpenTelemetry activity source and service names by @​StefH
in wiremock/WireMock.Net#1550


**Full Changelog**:
wiremock/WireMock.Net@2.32.0...2.33.0

## 2.32.0

## What's Changed
* Depend on Microsoft.AspNetCore.App for .NET 8 and .NET 10 by @​StefH
in wiremock/WireMock.Net#1544
* Upgrade ProtoBufJsonConverter to latest by @​StefH in
wiremock/WireMock.Net#1545
* Test Testcontainers ConsoleApp on Linux by @​StefH in
wiremock/WireMock.Net#1547
* Upgrade ProtoBufJsonConverter to latest by @​StefH in
wiremock/WireMock.Net#1548


**Full Changelog**:
wiremock/WireMock.Net@2.31.0...2.32.0

## 2.31.0

## What's Changed
* New SonarCloud project by @​StefH in
wiremock/WireMock.Net#1534
* Bump Aspire from 13.6.4 to 13.6.5 by @​StefH in
wiremock/WireMock.Net#1540
* Bump Microsoft.AspNetCore.WebUtilities from 2.3.0 to 2.3.14 by
@​dependabot[bot] in wiremock/WireMock.Net#1538
* Upgrade dependencies by @​StefH in
wiremock/WireMock.Net#1542
* Use X509CertificateLoader on .NET 9+ by @​StefH in
wiremock/WireMock.Net#1543


**Full Changelog**:
wiremock/WireMock.Net@2.30.0...2.31.0

## 2.30.0

## What's Changed
* Publish standalone single-file binaries in GitHub Releases by
@​tomas-pinto in wiremock/WireMock.Net#1527
* Add .NET 10 target framework by @​StefH in
wiremock/WireMock.Net#1528
* Use 10.x.x NuGets for .NET 10 by @​StefH in
wiremock/WireMock.Net#1530
* Use version-aligned DCP for Aspire integration tests by @​StefH with
@​Copilot in wiremock/WireMock.Net#1531
* Switch to IHost for .NET 10 + update dotnet-WireMock by @​StefH in
wiremock/WireMock.Net#1532

## New Contributors
* @​tomas-pinto made their first contribution in
wiremock/WireMock.Net#1527

**Full Changelog**:
wiremock/WireMock.Net@2.21.0...2.30.0

Commits viewable in [compare
view](wiremock/WireMock.Net@2.21.0...2.35.0).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=WireMock.Net&package-manager=nuget&previous-version=2.21.0&new-version=2.35.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for passing ENV variable for Otel Activity Name

2 participants