generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: build out smoke test with more detailed example app (#85)
## Which problem is this PR solving? - Closes #42 ## Short description of the changes - add example app written in TypeScript, uses webpack - build out example app with custom instrumentation, resource attributes, baggage, and more - simplify hello world app again - update smoke test to use new example app, and add more assertions - clean up cypress tests based on [best practices](https://docs.cypress.io/guides/references/best-practices) - add format script to let prettier clean my code for me on-demand - update tsconfig to properly search all subdirectories of examples as needed ## How to verify that this has the expected result Following instructions for each app works, and smoke tests pass
- Loading branch information
1 parent
1d61d5e
commit a779ced
Showing
17 changed files
with
4,729 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-bullseye | ||
|
||
# Create app directory | ||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN npm install | ||
|
||
RUN npm run build | ||
|
||
WORKDIR /usr/src/app/examples/custom-with-collector-ts | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
|
||
EXPOSE 1234 | ||
CMD [ "npm", "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
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
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,36 @@ | ||
# TypeScript Example for the Honeycomb Web SDK | ||
|
||
This example is written in TypeScript, uses webpack, and sends to a Collector. | ||
|
||
It also shows | ||
|
||
- adding custom instrumentation | ||
- adding custom resource attributes | ||
- adding to baggage to set attributes on child spans with the built-in baggage span processor | ||
|
||
This example is used in our smoke / integration testing. | ||
|
||
## Run this application locally, send straight to Honeycomb | ||
|
||
Add your API key and comment out the endpoint. | ||
|
||
```sh | ||
# install dependencies | ||
npm install | ||
# compile and bundle | ||
npm run build | ||
# start app | ||
npm start | ||
``` | ||
|
||
## Run this application in Docker, send straight to Honeycomb | ||
|
||
Add your API key and comment out the endpoint. | ||
|
||
From root directory, run `docker-compose up --build app-custom-with-collector-ts` | ||
|
||
## Send telemetry to Collector, then to Honeycomb | ||
|
||
Add your API key and uncomment the `otlp` exporter in `otel-collector-config.yaml`. | ||
|
||
From the root directory, `docker-compose up --build collector app-custom-with-collector-ts` |
Oops, something went wrong.