-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #733 from instana/instana-exporter-example
chore: added instana exporter example
- Loading branch information
Showing
10 changed files
with
3,728 additions
and
0 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 @@ | ||
node_modules |
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 @@ | ||
node_modules |
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,15 @@ | ||
FROM node:18 | ||
|
||
ENV INSTANA_AUTO_PROFILE true | ||
|
||
EXPOSE 8080 | ||
|
||
WORKDIR /opt/server | ||
|
||
COPY package-lock.json package.json /opt/server/ | ||
|
||
RUN npm install | ||
|
||
COPY server.js tracer.js logger.js /opt/server/ | ||
|
||
CMD ["node", "-r", "./tracer.js", "server.js"] |
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,11 @@ | ||
## Opentelemetry Instana Exporter Demo | ||
|
||
https://www.ibm.com/docs/en/instana-observability/243?topic=nodejs-opentelemetry-integration#serverless-opentelemetry-exporter | ||
|
||
This demo will transform Otel spans into Instana spans using the Instana exporter. The spans are send directly to the serverless acceptor in our backend. Data is generated every 5s. | ||
|
||
1. Copy env.example to .env | ||
2. Add APP_PORT, INSTANA_AGENT_KEY and INSTANA_ENDPOINT_URL. (You need to use the serverless endpoint) | ||
3. `npm run start` | ||
4. Go to services and look for "Instana Exporter Demo" | ||
|
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,7 @@ | ||
'use strict'; | ||
|
||
const logger = require('pino')(); | ||
const pinoHttp = require('pino-http')(); | ||
|
||
module.exports = logger; | ||
module.exports.expressLogger = pinoHttp; |
Oops, something went wrong.