Skip to content

Commit 9dfa5be

Browse files
fix: Updating sdk values to reduce frequency of network requests (#235)
## Summary Changing some of the otel configurations in response to some customer feedback: - concurrency limit is lowered to reasonable value - export batch size was far below default, leading to many requests - max queue size was also much below default, upped to default - scheduled delay was 6x the default, reverted to default so requests wouldn't be as delayed - max retry attempts 10 -> 3 ## How did you test this change? Tested locally ## Are there any deployment considerations? No
1 parent 4612b45 commit 9dfa5be

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sdk/highlight-run/src/client/otel/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const setupBrowserTracing = (
115115

116116
const exporterOptions: TraceExporterConfig = {
117117
url: config.otlpEndpoint + '/v1/traces',
118-
concurrencyLimit: 100,
118+
concurrencyLimit: 10,
119119
timeoutMillis: 30_000,
120120
// Using any because we were getting an error importing CompressionAlgorithm
121121
// from @opentelemetry/otlp-exporter-base.
@@ -131,11 +131,12 @@ export const setupBrowserTracing = (
131131
sampler,
132132
)
133133

134+
// https://opentelemetry.io/docs/specs/otel/logs/sdk/
134135
const spanProcessor = new CustomBatchSpanProcessor(exporter, {
135-
maxExportBatchSize: 100,
136-
maxQueueSize: 1_000,
137-
exportTimeoutMillis: exporterOptions.timeoutMillis,
138-
scheduledDelayMillis: exporterOptions.timeoutMillis,
136+
maxExportBatchSize: 1024, // Default value from SDK is 512
137+
maxQueueSize: 2048, // Default value from SDK is 2048
138+
exportTimeoutMillis: exporterOptions.timeoutMillis, // Default value from SDK is 30_000
139+
scheduledDelayMillis: exporterOptions.timeoutMillis, // Default value from SDK is 1000
139140
})
140141

141142
const resource = new Resource({

sdk/highlight-run/src/client/utils/graph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ClientError } from 'graphql-request'
22
import { PublicGraphError } from '../graph/generated/schemas'
33

4-
export const MAX_PUBLIC_GRAPH_RETRY_ATTEMPTS = 10
4+
export const MAX_PUBLIC_GRAPH_RETRY_ATTEMPTS = 3
55

66
// Initial backoff for retrying graphql requests.
77
export const BASE_DELAY_MS = 1000

0 commit comments

Comments
 (0)