@opentelemetry/api 0.12.0 → 0.14.0

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.
Files changed (79) hide show
  1. package/README.md +2 -2
  2. package/build/src/api/global-utils.d.ts +1 -1
  3. package/build/src/api/global-utils.js +1 -1
  4. package/build/src/api/propagation.d.ts +5 -7
  5. package/build/src/api/propagation.js +7 -12
  6. package/build/src/api/propagation.js.map +1 -1
  7. package/build/src/{correlation_context/CorrelationContext.d.ts → baggage/Baggage.d.ts} +5 -5
  8. package/build/src/{trace/instrumentation/Plugin.js → baggage/Baggage.js} +1 -1
  9. package/build/src/baggage/Baggage.js.map +1 -0
  10. package/build/src/{correlation_context → baggage}/EntryValue.d.ts +0 -0
  11. package/build/src/{correlation_context → baggage}/EntryValue.js +0 -0
  12. package/build/src/baggage/EntryValue.js.map +1 -0
  13. package/build/src/context/context.d.ts +11 -1
  14. package/build/src/context/context.js +22 -2
  15. package/build/src/context/context.js.map +1 -1
  16. package/build/src/context/propagation/NoopTextMapPropagator.d.ts +3 -2
  17. package/build/src/context/propagation/NoopTextMapPropagator.js +5 -2
  18. package/build/src/context/propagation/NoopTextMapPropagator.js.map +1 -1
  19. package/build/src/context/propagation/TextMapPropagator.d.ts +52 -9
  20. package/build/src/context/propagation/TextMapPropagator.js +23 -0
  21. package/build/src/context/propagation/TextMapPropagator.js.map +1 -1
  22. package/build/src/index.d.ts +2 -5
  23. package/build/src/index.js +2 -5
  24. package/build/src/index.js.map +1 -1
  25. package/build/src/metrics/Meter.d.ts +18 -5
  26. package/build/src/metrics/Metric.d.ts +5 -3
  27. package/build/src/metrics/Metric.js.map +1 -1
  28. package/build/src/metrics/NoopMeter.d.ts +28 -14
  29. package/build/src/metrics/NoopMeter.js +36 -20
  30. package/build/src/metrics/NoopMeter.js.map +1 -1
  31. package/build/src/trace/NoopLogger.d.ts +4 -4
  32. package/build/src/trace/NoopLogger.js +12 -12
  33. package/build/src/trace/NoopLogger.js.map +1 -1
  34. package/build/src/trace/NoopSpan.d.ts +7 -7
  35. package/build/src/trace/NoopSpan.js +7 -7
  36. package/build/src/trace/NoopSpan.js.map +1 -1
  37. package/build/src/trace/NoopTracer.d.ts +1 -1
  38. package/build/src/trace/NoopTracer.js +6 -7
  39. package/build/src/trace/NoopTracer.js.map +1 -1
  40. package/build/src/trace/Sampler.d.ts +4 -5
  41. package/build/src/trace/SpanOptions.d.ts +2 -15
  42. package/build/src/trace/attributes.d.ts +5 -0
  43. package/build/src/trace/span.d.ts +5 -2
  44. package/build/src/trace/span_context.d.ts +1 -1
  45. package/build/src/trace/status.d.ts +10 -128
  46. package/build/src/trace/status.js +12 -130
  47. package/build/src/trace/status.js.map +1 -1
  48. package/build/src/trace/trace_state.d.ts +8 -7
  49. package/build/src/trace/trace_state.js +15 -0
  50. package/build/src/trace/trace_state.js.map +1 -1
  51. package/build/src/version.d.ts +1 -1
  52. package/build/src/version.js +1 -1
  53. package/package.json +15 -15
  54. package/build/src/context/propagation/HttpTextPropagator.d.ts +0 -44
  55. package/build/src/context/propagation/HttpTextPropagator.js +0 -18
  56. package/build/src/context/propagation/HttpTextPropagator.js.map +0 -1
  57. package/build/src/context/propagation/NoopHttpTextPropagator.d.ts +0 -13
  58. package/build/src/context/propagation/NoopHttpTextPropagator.js +0 -35
  59. package/build/src/context/propagation/NoopHttpTextPropagator.js.map +0 -1
  60. package/build/src/context/propagation/getter.d.ts +0 -10
  61. package/build/src/context/propagation/getter.js +0 -30
  62. package/build/src/context/propagation/getter.js.map +0 -1
  63. package/build/src/context/propagation/setter.d.ts +0 -9
  64. package/build/src/context/propagation/setter.js +0 -29
  65. package/build/src/context/propagation/setter.js.map +0 -1
  66. package/build/src/correlation_context/CorrelationContext.js +0 -18
  67. package/build/src/correlation_context/CorrelationContext.js.map +0 -1
  68. package/build/src/correlation_context/EntryValue.js.map +0 -1
  69. package/build/src/metrics/MetricObservable.d.ts +0 -18
  70. package/build/src/metrics/MetricObservable.js +0 -3
  71. package/build/src/metrics/MetricObservable.js.map +0 -1
  72. package/build/src/trace/instrumentation/BasePlugin.d.ts +0 -65
  73. package/build/src/trace/instrumentation/BasePlugin.js +0 -18
  74. package/build/src/trace/instrumentation/BasePlugin.js.map +0 -1
  75. package/build/src/trace/instrumentation/Instrumentation.d.ts +0 -50
  76. package/build/src/trace/instrumentation/Instrumentation.js +0 -18
  77. package/build/src/trace/instrumentation/Instrumentation.js.map +0 -1
  78. package/build/src/trace/instrumentation/Plugin.d.ts +0 -71
  79. package/build/src/trace/instrumentation/Plugin.js.map +0 -1
@@ -1,50 +0,0 @@
1
- import { MeterProvider } from '../..';
2
- import { Logger } from '../../common/Logger';
3
- import { TracerProvider } from '../tracer_provider';
4
- /** Interface Instrumentation to apply patch. */
5
- export interface Instrumentation {
6
- /** Instrumentation Name */
7
- instrumentationName: string;
8
- /** Instrumentation Version */
9
- instrumentationVersion: string;
10
- /**
11
- * Instrumentation Description - please describe all useful information
12
- * as Instrumentation might patch different version of different modules,
13
- * or support different browsers etc.
14
- */
15
- instrumentationDescription?: string;
16
- /** Method to disable the instrumentation */
17
- disable(): void;
18
- /** Method to enable the instrumentation */
19
- enable(): void;
20
- /** Method to patch the instrumentation */
21
- /** Method to set tracer provider */
22
- setTracerProvider(tracerProvider: TracerProvider): void;
23
- /** Method to set meter provider */
24
- setMeterProvider(meterProvider: MeterProvider): void;
25
- /**
26
- * Contains all supported versions.
27
- * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format.
28
- * If the version is not supported, we won't apply instrumentation patch (see `enable` method).
29
- * If omitted, all versions of the module will be patched.
30
- */
31
- supportedVersions?: string[];
32
- }
33
- export interface InstrumentationConfig {
34
- /**
35
- * Whether to enable the plugin.
36
- * @default true
37
- */
38
- enabled?: boolean;
39
- logger?: Logger;
40
- /**
41
- * Request methods that match any string in ignoreMethods will not be traced.
42
- */
43
- ignoreMethods?: string[];
44
- /**
45
- * Path of the trace plugin to load.
46
- * @default '@opentelemetry/plugin-http' in case of http.
47
- */
48
- path?: string;
49
- }
50
- //# sourceMappingURL=Instrumentation.d.ts.map
@@ -1,18 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- //# sourceMappingURL=Instrumentation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Instrumentation.js","sourceRoot":"","sources":["../../../../src/trace/instrumentation/Instrumentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}
@@ -1,71 +0,0 @@
1
- import { Logger } from '../../common/Logger';
2
- import { TracerProvider } from '../tracer_provider';
3
- /** Interface Plugin to apply patch. */
4
- export interface Plugin<T = any> {
5
- /**
6
- * Contains all supported versions.
7
- * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format.
8
- * If the version is not supported, we won't apply instrumentation patch (see `enable` method).
9
- * If omitted, all versions of the module will be patched.
10
- */
11
- supportedVersions?: string[];
12
- /**
13
- * Name of the module that the plugin instrument.
14
- */
15
- moduleName: string;
16
- /**
17
- * Method that enables the instrumentation patch.
18
- * @param moduleExports The value of the `module.exports` property that would
19
- * normally be exposed by the required module. ex: `http`, `https` etc.
20
- * @param TracerProvider a tracer provider.
21
- * @param logger a logger instance.
22
- * @param [config] an object to configure the plugin.
23
- */
24
- enable(moduleExports: T, TracerProvider: TracerProvider, logger: Logger, config?: PluginConfig): T;
25
- /** Method to disable the instrumentation */
26
- disable(): void;
27
- }
28
- export interface PluginConfig {
29
- /**
30
- * Whether to enable the plugin.
31
- * @default true
32
- */
33
- enabled?: boolean;
34
- /**
35
- * Path of the trace plugin to load.
36
- * @default '@opentelemetry/plugin-http' in case of http.
37
- */
38
- path?: string;
39
- /**
40
- * Request methods that match any string in ignoreMethods will not be traced.
41
- */
42
- ignoreMethods?: string[];
43
- /**
44
- * URLs that partially match any regex in ignoreUrls will not be traced.
45
- * In addition, URLs that are _exact matches_ of strings in ignoreUrls will
46
- * also not be traced.
47
- */
48
- ignoreUrls?: Array<string | RegExp>;
49
- /**
50
- * List of internal files that need patch and are not exported by
51
- * default.
52
- */
53
- internalFilesExports?: PluginInternalFiles;
54
- /**
55
- * If true, additional information about query parameters and
56
- * results will be attached (as `attributes`) to spans representing
57
- * database operations.
58
- */
59
- enhancedDatabaseReporting?: boolean;
60
- }
61
- export interface PluginInternalFilesVersion {
62
- [pluginName: string]: string;
63
- }
64
- /**
65
- * Each key should be the name of the module to trace, and its value
66
- * a mapping of a property name to a internal plugin file name.
67
- */
68
- export interface PluginInternalFiles {
69
- [versions: string]: PluginInternalFilesVersion;
70
- }
71
- //# sourceMappingURL=Plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../../src/trace/instrumentation/Plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG"}