Skip to content

Commit

Permalink
Add SpanExporter
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurkale22 committed Aug 2, 2019
1 parent 7b629d6 commit 977d9b0
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 25 deletions.
92 changes: 67 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,75 @@
version: 2

unit_tests: &unit_tests
steps:
- checkout
- run:
name: Create Checksum
command: sh .circleci/checksum.sh /tmp/checksums.txt
- restore_cache:
keys:
- npm-cache-{{ checksum "/tmp/checksums.txt" }}
- run:
name: Install Dependencies
command: yarn install
- save_cache:
key: npm-cache-{{ checksum "/tmp/checksums.txt" }}
paths:
- ./node_modules
- ./yarn.lock
- ./packages/*/node_modules
- ./packages/*/yarn.lock
- run:
name: Compile
command: yarn compile
- run:
name: Test
command: yarn test
- run:
name: report-coverage
command: yarn codecov

jobs:
build:
lint:
docker:
- image: circleci/node:12
- image: node
steps:
- checkout
- run:
name: Create Checksum
command: sh .circleci/checksum.sh /tmp/checksums.txt
- restore_cache:
keys:
- npm-cache-{{ checksum "/tmp/checksums.txt" }}
- run:
name: Install Dependencies
command: yarn install
- save_cache:
key: npm-cache-{{ checksum "/tmp/checksums.txt" }}
paths:
- ./node_modules
- ./yarn.lock
- ./packages/*/node_modules
- ./packages/*/yarn.lock
- run:
name: Lint
command: yarn run check
name: Install modules and dependencies.
command: npm install
- run:
name: Compile
command: yarn compile
- run:
name: Test
command: yarn test
name: Check code style and linting
command: npm run check
node8:
docker:
- image: node:8
<<: *unit_tests
node10:
docker:
- image: node:10
<<: *unit_tests
node11:
docker:
- image: node:11
<<: *unit_tests
node12:
docker:
- image: node:12
<<: *unit_tests
node12-browsers:
docker:
- image: circleci/node:12-browsers
<<: *unit_tests


workflows:
version: 2
build:
jobs:
- lint
- node8
- node10
- node11
- node12
- node12-browsers
32 changes: 32 additions & 0 deletions packages/opentelemetry-types/src/trace/export/SpanExporter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Copyright 2019, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { Span } from '../span';

/**
* An interface that allows different tracing services to export recorded data
* for sampled spans in their own format.
*/
export interface SpanExporter {
/**
* Called to export sampled {@link Span}s.
* @param spans the list of sampled Spans to be exported.
*/
export(spans: Span[]): void;

/** Stops the exporter. */
stop(): void;
}

0 comments on commit 977d9b0

Please sign in to comment.