Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
reese-lee authored Jul 12, 2024
1 parent a5fa751 commit 035e50f
Showing 1 changed file with 77 additions and 6 deletions.
83 changes: 77 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ After you follow our [quick start instructions]() to deploy the app, check out

### Modifications
Please note the following modifications to our fork:
* recommendationservice has been instrumented with the [New Relic Python APM agent](https://docs.newrelic.com/docs/apm/agents/python-agent/getting-started/introduction-new-relic-python/)
to demonstrate interoperability between our language agents and OpenTelemetry
instrumentation
* The helm values file has been modified to avoid breaking upstream changes
* The .env file contains New Relic-specific environment variables so you can quickly
ship the data to your account
Expand All @@ -35,7 +32,7 @@ cd opentelemetry-demo
3. Export your [account license key](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher?_gl=1*r26ze0*_gcl_au*NjkxMjc4NDcyLjE3MTU2NDM4OTg.*_ga*NjYzMTg1ODUwLjE3MTU2NDM4OTg.*_ga_R5EF3MCG7B*MTcxOTQ1MzE4Ni4xNS4xLjE3MTk0NTMyOTQuNTYuMS40OTYzNDkyMzk.)
(make sure to replace `your_license_key` with your license key):
```
export NEWRELIC_LICENSE_KEY=your_license_key
export NEW_RELIC_LICENSE_KEY=your_license_key
```
4. Build and run the app:
```
Expand All @@ -47,19 +44,93 @@ docker compose up
#### Kubernetes
[Check out these steps](https://github.com/newrelic/opentelemetry-demo/blob/main/docs/kubernetes_deployment.md).

### Navigate OTLP data in New Relic
The Demo comes with a number of problem scenarios that you can enable via
a [feature flag](https://opentelemetry.io/docs/demo/feature-flags/); please
note that some of these are currently still under testing on our end.

For this example, we've enabled the feature flag for `productcatalogservice`,
which generates an error for `GetProduct` requests with the product ID:
OLJCESPC7Z.

If you would like to follow along, navigate to src > flagd > demo.flagd.json,
and on line 11, change the value for `defaultVariant` to `on`. Save the file,
and restart the app.

Wait a few minutes for the load generator to generate new data; you will pretty
quickly see that the error rates for a couple services have increased. First, go
to the `productcatalogservice` entity in your New Relic account and click on `Errors
inbox`:

<img width="1401" alt="demo-productcatalogservice-01" src="https://github.com/user-attachments/assets/0105da4b-67d0-4ffe-96d7-fc34b163e6d5">

(In case you are wondering why the Error rate chart next to the Error count chart
appears empty, click on the `...` and select `View query`. You'll see that
this chart is querying for HTTP status code 500. Since this entity isn't
reporting any 500s, this chart is empty.)

Select the error group `oteldemo.ProductCatalogService/GetProduct`, which will open up
the error group summary and confirm that the feature flag was enabled:

<img width="1460" alt="demo-productcatalogservice02" src="https://github.com/user-attachments/assets/818f7340-340b-4489-961e-849653520d86">

(Note that there are no logs for this service at this time; per this [
table](https://opentelemetry.io/docs/demo/telemetry-features/log-coverage/), logs have not yet been
added for `productcatalogservice`.)

Scroll down to `Attributes`, and you can see the attribute `app.product.id` with
the value `OLJCESPC7Z` was captured:

<img width="1453" alt="demo-productcatalogservice03" src="https://github.com/user-attachments/assets/c4149479-9274-4e20-abb6-1c1db97819d6">

This in itself is not particularly interesting; head on over to the `checkoutservice`
entity and click on `Errors inbox`. You'll see an error group named
`oteldemo.CheckoutService/PlaceOrder`, with the message `failed to prepare order:
failed to get product #"OLJCESPC7Z"`:

<img width="1404" alt="demo-checkoutservice01" src="https://github.com/user-attachments/assets/a08c1ca3-376a-48b1-b154-095925668663">

Click on the blue icon under `Distributed Trace`:

<img width="1471" alt="demo-checkoutservice02" src="https://github.com/user-attachments/assets/2c0b69b2-a227-4d64-884c-93a17690dbc9">

You'll see a distributed trace that includes an entity map, showing you how the
error you enabled with the feature flag affected upstream services:

<img width="1333" alt="demo-checkoutservice03" src="https://github.com/user-attachments/assets/d21365d7-4fb3-4ecc-9719-9fb503f2b476">

Click on the "Errors" dropdown menu and select the `checkoutservice` span named
`oteldemo.CheckoutService/PlaceOrder`:

<img width="954" alt="demo-checkoutservice04" src="https://github.com/user-attachments/assets/54402a1e-c6b8-41fe-9c59-bdff62952d24">

On the right-hand panel, click on `View span events` to view more details about
the span event that was captured:

<img width="1330" alt="demo-checkoutservice-05" src="https://github.com/user-attachments/assets/06a29ac2-9492-4a0e-8f58-63d4f48c51b9">

<img width="1468" alt="demo-checkoutservice06" src="https://github.com/user-attachments/assets/dbf7100a-c831-4392-8c8e-ac19e4d95c97">

Since this is a contrived issue, there isn't a lot of particularly useful information
to view, but it does demonstrate how the error metrics captured are early indicators of these issues
and how they can affect the performance and reliability of your services. Using New Relic
can help you quickly resolve issues by uncovering the root cause through correlated logs and traces,
giving you detailed insights into what happened during a given problem.

### Roadmap
Similar to how the Astronomy Shop is under active development, we are also actively
developing and maintaining our fork. Here are a few things we have are working on, or
have planned for the near future:
* [Demo scenario feature flags](https://opentelemetry.io/docs/demo/feature-flags/) are in testing
* Support for OTel-sourced Kubernetes infrastructure metrics in New Relic
* Support for OTel-sourced Kubernetes infrastructure metrics in New Relic
* add NR instrumentation for recommendationservice to demonstrate interoperability between our language agents and OpenTelemetry
instrumentation

Have a suggestion, or running into problems with our fork? Please let us know by
[opening an issue](https://github.com/newrelic/opentelemetry-demo/issues/new/choose)!

### Contributors
* [Brad Schmitt](https://github.com/bpschmitt)
* [Mir Ansar Ali Wasif]()
* [Daniel Kim](https://github.com/lazyplatypus)
* [Krzysztof Spikowski](https://github.com/greenszpila)

Expand Down

0 comments on commit 035e50f

Please sign in to comment.