Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
node_modules

.yarn/cache
.yarn/install-state.gz
.yarn/install-state.gz

# Needed for OpenTelemetry
!packages/backend/src/instrumentation.js
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./
# Copy any other files that we need at runtime
COPY --chown=node:node app-config.yaml app-config.*.yaml ./

# Copy the instrumentation.js needed to expose the OpenTelemetry data
COPY --chown=node:node packages/backend/src/instrumentation.js ./

# Heroku will assign the port dynamically; the default value here will be overridden by what Heroku passes in
# For local development the default will be used
ENV PORT=7007
Expand All @@ -113,4 +116,4 @@ ENV NODE_OPTIONS="--max-old-space-size=1000 --no-node-snapshot"
# Default is 'heroku', for local testing pass in 'local'
ENV ENVIRONMENT_CONFIG=${ENVIRONMENT_CONFIG}

CMD ["sh", "-c", "node packages/backend --config app-config.yaml --config app-config.${ENVIRONMENT_CONFIG}.yaml"]
CMD ["sh", "-c", "node --require ./instrumentation.js packages/backend --config app-config.yaml --config app-config.${ENVIRONMENT_CONFIG}.yaml"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ The Search plugin has been expanded to include results from the Explore plugins

More information on adjusting search can be found in the [Customizing Search](https://backstage.io/docs/features/search/getting-started#customizing-search) documentation.

### OpenTelemetry

We've setup the Demo to expose the OpenTelemetry metrics following the [Setup OpenTelemetry](https://backstage.io/docs/tutorials/setup-opentelemetry) tutorial. These metrics are only available when you run the project locally after running `yarn start` and then accessing them from <http://localhost:9464/metrics>.

## Upgrading

This Demo site is kept in-sync with the weekly `next` release line as defined in the [Release Lines](https://backstage.io/docs/overview/versioning-policy#release-lines) documentation. Upgrading the Demo site has been automated so that a Pull Request with the latest changes is created the day after the weekly `next` release is published. This allows us to easily stay up to date!
Expand Down
12 changes: 10 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"$schema": "https://unpkg.com/knip@3/schema.json",
"ignore": ["**/setupTests.ts", "**/.eslintrc.js", "**/config.d.ts"],
"ignore": [
"**/setupTests.ts",
"**/.eslintrc.js",
"**/config.d.ts",
"packages/backend/src/instrumentation.js"
],
"ignoreDependencies": [
"better-sqlite3",
"app",
Expand All @@ -9,6 +14,9 @@
"lint-staged",
"@types/lodash",
"@types/d3",
"@types/glob"
"@types/glob",
"@opentelemetry/auto-instrumentations-node",
"@opentelemetry/exporter-prometheus",
"@opentelemetry/sdk-node"
]
}
Loading