Skip to content

Commit

Permalink
Update otel to 0.25 (signalfx#239)
Browse files Browse the repository at this point in the history
* update and rename dependencies

* Update package lock

Co-authored-by: MartenH <72463136+mhennoch@users.noreply.github.com>
Co-authored-by: mhennoch <mhennoch@splunk.com>
  • Loading branch information
3 people authored Sep 28, 2021
1 parent 8b571d2 commit 7cf3029
Show file tree
Hide file tree
Showing 14 changed files with 195 additions and 195 deletions.
2 changes: 1 addition & 1 deletion docs/Exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Splunk's RUM uses Zipkin exporter for sending data to `beaconUrl` endpoint. Othe

```html
import SplunkRum from '@splunk/otel-js-browser'
import {BatchSpanProcessor} from '@opentelemetry/tracing'
import {BatchSpanProcessor} from '@opentelemetry/sdk-trace-base'
import {CollectorTraceExporter} from '@opentelemetry/exporter-collector'

const exporter = new CollectorTraceExporter({
Expand Down
338 changes: 169 additions & 169 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@
"dependencies": {
"@babel/runtime": "~7.14.0",
"@opentelemetry/api": "1.0.2",
"@opentelemetry/api-metrics": "0.24.0",
"@opentelemetry/core": "0.24.0",
"@opentelemetry/exporter-zipkin": "0.24.0",
"@opentelemetry/instrumentation": "0.24.0",
"@opentelemetry/instrumentation-document-load": "0.24.0",
"@opentelemetry/instrumentation-fetch": "0.24.0",
"@opentelemetry/instrumentation-user-interaction": "0.24.0",
"@opentelemetry/instrumentation-xml-http-request": "0.24.0",
"@opentelemetry/resources": "0.24.0",
"@opentelemetry/semantic-conventions": "0.24.0",
"@opentelemetry/tracing": "0.24.0",
"@opentelemetry/web": "0.24.0",
"@opentelemetry/api-metrics": "0.25.0",
"@opentelemetry/core": "0.25.0",
"@opentelemetry/exporter-zipkin": "0.25.0",
"@opentelemetry/instrumentation": "0.25.0",
"@opentelemetry/instrumentation-document-load": "0.25.0",
"@opentelemetry/instrumentation-fetch": "0.25.0",
"@opentelemetry/instrumentation-user-interaction": "0.25.0",
"@opentelemetry/instrumentation-xml-http-request": "0.25.0",
"@opentelemetry/resources": "0.25.0",
"@opentelemetry/sdk-trace-base": "0.25.0",
"@opentelemetry/sdk-trace-web": "0.25.0",
"@opentelemetry/semantic-conventions": "0.25.0",
"shimmer": "~1.2.1",
"web-vitals": "~2.1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/SplunkDocumentLoadInstrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-document-load';
import * as api from '@opentelemetry/api';
import { captureTraceParentFromPerformanceEntries } from './servertiming';
import { PerformanceEntries } from '@opentelemetry/web';
import { Span } from '@opentelemetry/tracing';
import { PerformanceEntries } from '@opentelemetry/sdk-trace-web';
import { Span } from '@opentelemetry/sdk-trace-base';

const excludedInitiatorTypes = ['beacon', 'fetch', 'xmlhttprequest'];

Expand Down
2 changes: 1 addition & 1 deletion src/SplunkErrorInstrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import * as shimmer from 'shimmer';
import { getElementXPath } from '@opentelemetry/web';
import { getElementXPath } from '@opentelemetry/sdk-trace-web';
import { limitLen } from './utils';
import { Span } from '@opentelemetry/api';
import { hrTime } from '@opentelemetry/core';
Expand Down
2 changes: 1 addition & 1 deletion src/SplunkExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import { ExportResult, ExportResultCode } from '@opentelemetry/core';
import { limitLen } from './utils';
import { SpanAttributes, SpanKind } from '@opentelemetry/api';
import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing';
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';

const MAX_VALUE_LIMIT = 4096;
const SPAN_RATE_LIMIT_PERIOD = 30000; // millis, sweep to clear out span counts
Expand Down
2 changes: 1 addition & 1 deletion src/SplunkPostDocLoadResourceInstrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {

import { VERSION } from './version';
import { hrTime, isUrlIgnored } from '@opentelemetry/core';
import { addSpanNetworkEvents } from '@opentelemetry/web';
import { addSpanNetworkEvents } from '@opentelemetry/sdk-trace-web';
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';

export interface SplunkPostDocLoadResourceInstrumentationConfig extends InstrumentationConfig {
Expand Down
4 changes: 2 additions & 2 deletions src/SplunkWebTracerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { WebTracerConfig, WebTracerProvider } from '@opentelemetry/web';
import { WebTracerConfig, WebTracerProvider } from '@opentelemetry/sdk-trace-web';
import { propagation, context, trace, SpanAttributes } from '@opentelemetry/api';
import { Tracer } from '@opentelemetry/tracing';
import { Tracer } from '@opentelemetry/sdk-trace-base';

export interface SplunkWebTracerProviderConfig extends WebTracerConfig {
app: string;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
SpanExporter,
SpanProcessor,
BufferConfig,
} from '@opentelemetry/tracing';
} from '@opentelemetry/sdk-trace-base';
import { diag, DiagConsoleLogger, DiagLogLevel, SpanAttributes } from '@opentelemetry/api';
import { SplunkDocumentLoadInstrumentation } from './SplunkDocumentLoadInstrumentation';
import { SplunkXhrPlugin } from './SplunkXhrPlugin';
Expand Down
2 changes: 1 addition & 1 deletion src/servertiming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import { Span } from '@opentelemetry/api';
import { PerformanceEntries } from '@opentelemetry/web';
import { PerformanceEntries } from '@opentelemetry/sdk-trace-web';

function addMatchToSpan(match: RegExpMatchArray, span: Span): void {
if (match && match[1] && match[2]) {
Expand Down
2 changes: 1 addition & 1 deletion test/SplunkContextManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import { context, trace } from '@opentelemetry/api';
import { SpanProcessor } from '@opentelemetry/tracing';
import { SpanProcessor } from '@opentelemetry/sdk-trace-base';
import { expect } from 'chai';
import SplunkOtelWeb, { INSTRUMENTATIONS_ALL_DISABLED } from '../src/index';
import { SpanCapturer } from './utils';
Expand Down
2 changes: 1 addition & 1 deletion test/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { context, trace, SpanStatusCode } from '@opentelemetry/api';

import SplunkOtelWeb, { INSTRUMENTATIONS_ALL_DISABLED } from '../src/index';
import { SpanCapturer } from './utils';
import { SpanProcessor } from '@opentelemetry/tracing';
import { SpanProcessor } from '@opentelemetry/sdk-trace-base';

// note: we've added these tests mainly to keep track of substantial changes in the Open Telemetry API
describe('Transitive API', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import * as assert from 'assert';
import SplunkRum from '../src/index';
import { context, trace } from '@opentelemetry/api';
import * as tracing from '@opentelemetry/tracing';
import * as tracing from '@opentelemetry/sdk-trace-base';
import { deinit, initWithDefaultConfig, SpanCapturer } from './utils';
import sinon from 'sinon';
import { expect } from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { ReadableSpan, SimpleSpanProcessor, SpanProcessor } from '@opentelemetry/tracing';
import { ReadableSpan, SimpleSpanProcessor, SpanProcessor } from '@opentelemetry/sdk-trace-base';
import SplunkRum, { SplunkExporter, ZipkinSpan } from '../src/index';

export class SpanCapturer implements SpanProcessor {
Expand Down

0 comments on commit 7cf3029

Please sign in to comment.