@netlify/build 29.16.5 → 29.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/core/flags.js CHANGED
@@ -228,6 +228,11 @@ Default: false`,
228
228
  describe: 'Parent Span ID used to stitch the root parent span to',
229
229
  hidden: true,
230
230
  },
231
+ 'tracing.sampleRate': {
232
+ number: true,
233
+ describe: 'Trace sample rate for the given trace ID',
234
+ hidden: true,
235
+ },
231
236
  'tracing.traceFlags': {
232
237
  number: true,
233
238
  describe: 'Trace flags containing the trace settings for the given trace ID',
@@ -59,6 +59,8 @@ const getDefaultFlags = function ({ env: envOpt = {} }, combinedEnv) {
59
59
  tracing: {
60
60
  enabled: false,
61
61
  apiKey: '-',
62
+ // defaults to always sample
63
+ sampleRate: 1,
62
64
  httpProtocol: DEFAULT_OTEL_ENDPOINT_PROTOCOL,
63
65
  port: DEFAULT_OTEL_TRACING_PORT,
64
66
  },
@@ -28,6 +28,9 @@ export const startTracing = function (options, logger) {
28
28
  protocol: 'grpc',
29
29
  apiKey: options.apiKey,
30
30
  endpoint: `${options.httpProtocol}://${options.host}:${options.port}`,
31
+ sampleRate: options.sampleRate,
32
+ // Turn off auto resource detection so that we fully control the attributes we export
33
+ autoDetectResources: false,
31
34
  });
32
35
  // Set the diagnostics logger to our system logger. We also need to suppress the override msg
33
36
  // in case there's a default console logger already registered (it would log a msg to it)
@@ -50,6 +53,7 @@ export const stopTracing = async function () {
50
53
  // The shutdown method might return an error if we fail to flush the traces
51
54
  // We handle it and use our diagnostics logger
52
55
  await sdk.shutdown();
56
+ sdk = undefined;
53
57
  }
54
58
  catch (e) {
55
59
  diag.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.16.5",
3
+ "version": "29.17.1",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -65,7 +65,7 @@
65
65
  "@bugsnag/js": "^7.0.0",
66
66
  "@honeycombio/opentelemetry-node": "^0.4.0",
67
67
  "@netlify/cache-utils": "^5.1.5",
68
- "@netlify/config": "^20.6.3",
68
+ "@netlify/config": "^20.6.4",
69
69
  "@netlify/edge-bundler": "8.16.4",
70
70
  "@netlify/framework-info": "^9.8.10",
71
71
  "@netlify/functions-utils": "^5.2.18",
@@ -148,5 +148,5 @@
148
148
  "module": "commonjs"
149
149
  }
150
150
  },
151
- "gitHead": "bee369b7a72829316097febddb3cb5e9a8e7d829"
151
+ "gitHead": "5e684d0509bb094d0e11ff89559abf7eb2d806fc"
152
152
  }