Skip to content

Commit 856d8f6

Browse files
committed
chore(deployment): disable otel traces for usage service
1 parent 1f7c817 commit 856d8f6

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

deployment/services/observability.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { deployGrafana } from './grafana';
66
import { deployGrafanaAlerts } from './grafana-alerts';
77

88
// Change this to control OTEL tracing for usage service
9-
const enableTracingForUsageService = true;
9+
const enableTracingForUsageService = false;
1010

1111
export function deployObservability(config: { environment: Environment }) {
1212
const observabilityConfig = new pulumi.Config('observability');

deployment/utils/observability.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,16 @@ export class Observability {
211211
span: [
212212
// Ignore HEAD/OPTIONS
213213
'attributes["component"] == "proxy" and (attributes["http.method"] == "HEAD" or attributes["http.method"] == "OPTIONS")',
214-
//Ignore health checks
214+
// Ignore health checks
215215
'attributes["component"] == "proxy" and attributes["http.method"] == "GET" and (attributes["http.url"] == "/_readiness" or attributes["http.url"] == "/_health" or IsMatch(attributes["http.url"], ".*/_health"))',
216-
//Ignore /usage requests (200 or 429)
217-
'attributes["component"] == "proxy" and attributes["http.method"] == "POST" and (attributes["http.url"] == "/usage" or IsMatch(attributes["http.url"], "/usage/.*")) and (attributes["http.status_code"] == "200" or attributes["http.status_code"] == "429")',
216+
// Ignore /usage requests (200 or 429)
217+
'attributes["component"] == "proxy" and attributes["http.method"] == "POST" and (attributes["http.url"] == "/usage" or IsMatch(attributes["http.url"], "/usage/.*"))',
218218
// Ignore metrics scraping
219219
'attributes["component"] == "proxy" and attributes["http.method"] == "GET" and attributes["http.url"] == "/metrics"',
220220
// Ignore webapp HTTP calls via upstream cluster name
221221
'attributes["component"] == "proxy" and (attributes["http.method"] == "POST" or attributes["http.method"] == "GET") and IsMatch(attributes["upstream_cluster.name"], "default_app-.*")',
222222
// Hive Tracing is using these endpoints and they don't have any added value for us when monitored
223223
'attributes["component"] == "proxy" and attributes["http.method"] == "POST" and attributes["http.url"] == "/otel/v1/traces"',
224-
// Internal /usage calls can also be filtered out
225-
'resource.attributes["service.name"] == "usage" and attributes["http.status_code"] == 200 and IsRootSpan() == true',
226224
],
227225
},
228226
},

0 commit comments

Comments
 (0)