forked from ashleydavis/nodejs-microservices-example
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
224 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
extensions: | ||
# This extension is used to provide a debugging zpages traces_endpoint | ||
# see https://github.com/open-telemetry/opentelemetry-collector/blob/main/extension/zpagesextension/README.md for more details | ||
zpages: | ||
endpoint: 0.0.0.0:55679 | ||
|
||
receivers: | ||
# Default receiver to collect trace and metrics received from grpc and http protocols | ||
# Default is port 4317 for grpc and 4318 for http | ||
otlp: | ||
protocols: | ||
grpc: | ||
http: | ||
|
||
processors: | ||
# Recommended processor to proceed sending of traces or metrics in batch mode (requires less resources) | ||
batch: | ||
|
||
exporters: | ||
# Debugging exporter directly to system log | ||
logging: | ||
loglevel: debug | ||
|
||
service: | ||
pipelines: | ||
# Simple trace pipeline that will send all traces received from otlp protocol to the logs in batch mode | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging] | ||
|
||
# Activate the extension that will allow us to debug this configuration from the collector web interface on port 55679 by default | ||
extensions: [zpages] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* tracing.js */ | ||
|
||
// Require dependencies | ||
const opentelemetry = require("@opentelemetry/sdk-node"); | ||
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http'); | ||
const { getNodeAutoInstrumentations } = require("@opentelemetry/auto-instrumentations-node"); | ||
|
||
const sdk = new opentelemetry.NodeSDK({ | ||
traceExporter: new OTLPTraceExporter({}), | ||
// traceExporter: new OTLPTraceExporter({url: 'http://otel-collector:4318/v1/traces'}), | ||
instrumentations: [getNodeAutoInstrumentations()] | ||
}); | ||
|
||
sdk.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "service.name", | ||
"value": { | ||
"stringValue": "curl-test-otel-pipeline" | ||
} | ||
} | ||
] | ||
}, | ||
"instrumentationLibrarySpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"traceId": "71699b6fe85982c7c8995ea3d9c95ef4", | ||
"spanId": "3c191d03fa8be077", | ||
"name": "test-span", | ||
"kind": 1, | ||
"droppedAttributesCount": 0, | ||
"events": [], | ||
"droppedEventsCount": 0, | ||
"status": { | ||
"code": 1 | ||
} | ||
} | ||
], | ||
"instrumentationLibrary": { | ||
"name": "local-curl-example" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters