Skip to content

Commit

Permalink
[monitor-opentelemetry] Update enableTraceBasedSamplingForLogs config…
Browse files Browse the repository at this point in the history
… default value to false (#31082)

### Packages impacted by this PR
@azure/monitor-opentelemetry
  • Loading branch information
hectorhdzg authored Sep 11, 2024
1 parent e1e7eb4 commit deb5937
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions sdk/monitor/monitor-opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Update the relative path used in the OTel instrumentation patcher to work with webpack.
- Update OTel dependencies.
- Update enableTraceBasedSamplingForLogs config default value to false.

## 1.7.0 (2024-08-14)

Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/monitor-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ useAzureMonitor(options);
| enableStandardMetrics | Enable/Disable Standard Metrics. |true|
| logRecordProcessors | Array of log record processors to register to the global logger provider. ||
| spanProcessors | Array of span processors to register to the global tracer provider. ||
<!--- TODO: Enable when feature is released | enableTraceBasedSamplingForLogs | Enable log sampling based on trace. |true|-->
| enableTraceBasedSamplingForLogs | Enable log sampling based on trace. |false|

Options could be set using configuration file `applicationinsights.json` located under root folder of @azure/monitor-opentelemetry package installation folder, Ex: `node_modules/@azure/monitor-opentelemetry`. These configuration values will be applied to all AzureMonitorOpenTelemetryClient instances.

Expand Down
2 changes: 1 addition & 1 deletion sdk/monitor/monitor-opentelemetry/src/shared/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class InternalConfig implements AzureMonitorOpenTelemetryOptions {
this.samplingRatio = 1;
this.enableLiveMetrics = true;
this.enableStandardMetrics = true;
this.enableTraceBasedSamplingForLogs = true;
this.enableTraceBasedSamplingForLogs = false;
this.instrumentationOptions = {
http: { enabled: true },
azureSdk: { enabled: false },
Expand Down

0 comments on commit deb5937

Please sign in to comment.