-
Notifications
You must be signed in to change notification settings - Fork 853
Emit otel from Cosmos Db Preview Emulator #15671
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,6 +147,9 @@ private static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResou | |
| var emulatorSurrogate = new AzureCosmosDBEmulatorResource(builder.Resource); | ||
| var emulatorSurrogateBuilder = builder.ApplicationBuilder.CreateResourceBuilder(emulatorSurrogate); | ||
|
|
||
| emulatorSurrogateBuilder.WithOtlpExporter() | ||
| .WithEnvironment("ENABLE_OTLP_EXPORTER", "true"); | ||
|
Comment on lines
+150
to
+151
|
||
|
|
||
| // VNext cosmosdb sets a default CERT_SECRET environment variable for the default emulator certificate and we can't | ||
| // remove it, so we need to provide "some" secret value to avoid issues with our provided certificate. This simply sets the | ||
| // dev cert used by cosmos to have a stable passphrase. Users can override by calling `WithHttpsDeveloperCertificate` again | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description notes that validating OTLP emission currently requires running the preview emulator with a specific image tag (via the configureContainer callback). This playground update switches to RunAsPreviewEmulator but doesn’t set the image tag, so it won’t exercise the intended scenario until the default tag includes the required build. Consider updating this call to pass a configureContainer callback that sets the image tag (or add a comment explaining why the playground intentionally uses the default tag).