Skip to content

Commit

Permalink
Merge pull request #52 from miransar/nr-browser-agent-instrumentation
Browse files Browse the repository at this point in the history
Adds New Relic browser agent to frontend service.
  • Loading branch information
reese-lee authored Nov 2, 2024
2 parents fa50867 + 06113dd commit 840ac17
Show file tree
Hide file tree
Showing 7 changed files with 1,047 additions and 103 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Have a suggestion, or running into problems with our fork? Please let us know by

### Contributors
* [Brad Schmitt](https://github.com/bpschmitt)
* [Mir Ansar](https://github.com/miransar)
* [Daniel Kim](https://github.com/lazyplatypus)
* [Krzysztof Spikowski](https://github.com/greenszpila)
* [Ugur Türkarslan](https://github.com/utr1903)
Expand Down
8 changes: 8 additions & 0 deletions docs/kubernetes_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,18 @@ helm upgrade --install newrelic-otel open-telemetry/opentelemetry-demo --version

Optionally, you can enable a version of the `recommendationService` that is instrumented with New Relic APM instead of OpenTelemetry. New Relic APM instrumented services are interoperable with OpenTelemetry instrumented services as New Relic supports W3C trace context.


```console
helm upgrade --install newrelic-otel open-telemetry/opentelemetry-demo --version 0.32.0 --values ./helm/values.yaml --values ./helm/recommendation_service_values.yaml -n opentelemetry-demo
```


You can also enable New Relic browser agent to the frontend service. New Relic browser agent is interoperable with OpenTelemetry services as it supports W3C headers.

```console
helm upgrade --install newrelic-otel open-telemetry/opentelemetry-demo --version 0.32.0 --values ./helm/values.yaml --values ./helm/frontend_service.yaml -n opentelemetry-demo
```

## Install Prometheus Exporters (Optional)

You can install the Prometheus Exporters for Kafka, Postgres, and Redis to expose Prometheus metrics for the Kafka,
Expand Down
44 changes: 44 additions & 0 deletions helm/frontend_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
components:
frontend:
imageOverride:
repository: newrelic/otel-demo
tag: "1.11.0-frontend"
pullPolicy: Always
env:
- name: NEW_RELIC_APP_NAME
value: "frontend-web-nr"
- name: FRONTEND_PORT
value: "8080"
- name: FRONTEND_ADDR
value: :8080
- name: AD_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-adservice:8080'
- name: CART_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-cartservice:8080'
- name: CHECKOUT_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-checkoutservice:8080'
- name: CURRENCY_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-currencyservice:8080'
- name: PRODUCT_CATALOG_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-productcatalogservice:8080'
- name: RECOMMENDATION_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-recommendationservice:8080'
- name: SHIPPING_SERVICE_ADDR
value: '{{ include "otel-demo.name" . }}-shippingservice:8080'
- name: FLAGD_HOST
value: '{{ include "otel-demo.name" . }}-flagd'
- name: FLAGD_PORT
value: "8013"
- name: OTEL_COLLECTOR_HOST
value: $(OTEL_COLLECTOR_NAME)
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_COLLECTOR_NAME):4317
- name: WEB_OTEL_SERVICE_NAME
value: frontend-web
- name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
value: http://localhost:8080/otlp-http/v1/traces
- name: NEW_RELIC_LICENSE_KEY
valueFrom:
secretKeyRef:
name: newrelic-license-key
key: license-key
Loading

0 comments on commit 840ac17

Please sign in to comment.