Skip to content

Commit

Permalink
Merge branch 'main' into dotnet-code-getting-started
Browse files Browse the repository at this point in the history
  • Loading branch information
svrnm authored Nov 8, 2023
2 parents 3f2e3dc + 8a3891c commit 25176c0
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 0 deletions.
54 changes: 54 additions & 0 deletions content/en/blog/2023/otel-demo-16.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: OpenTelemetry Demo 1.6 released
linkTitle: Demo 1.6 Released
date: 2023-11-07
author: '[Austin Parker](https://github.com/austinlparker)'
---

The OpenTelemetry Demo has been updated to version 1.6, and introduces alpha
support for the OpenTelemetry [Log signal](/docs/concepts/signals/logs/)!

## Our thoughts on logs

Why are we considering logging support to be in alpha? There are a few reasons.
The most important is that this is the first time we've shipped the demo with a
logging database. We chose [OpenSearch](https://opensearch.org/) as the storage
backend for logs because it's a popular option that aligns with the project's
license. It's worth noting that the demo doesn't require application-level logs
— everything you care about is available as a span.

Where logs shine is in bridging the gap between application traces and
infrastructure, and over the next few releases, we plan to enhance this story by
collecting Kubernetes, Envoy, and other logs relevant to the demo.

If this sounds like an interesting problem, we'd love to have you as a
[contributor](https://github.com/open-telemetry/opentelemetry-demo/blob/main/CONTRIBUTING.md)!
We'd also appreciate any feedback you might have on how our support for logging
can improve.

## Other changes

This release also includes some nice additions on the Kubernetes side -- you'll
be able to increase the number of replicas per service, for instance. We've
updated many dependencies throughout the project as well.

## What's next?

With the addition of logging, the demo is mostly feature-complete. However,
there's more that can be done, and we're looking at a few major areas over the
next months:

- Increase the number of documented scenarios to demonstrate how OpenTelemetry
can be used to solve real-world problems.
- Ensure that the demo reflects the OpenTelemetry feature matrix and that we're
showing off everything you can do with the project.
- Improve our dashboards and add alerts, SLOs, and other observability features
to the demo.
- Support other clients and front-end RUM features as they're released.

As always, we'd love to hear your feedback on the demo, and if you're looking
for a place to start contributing, the demo is a great place to get involved!

Check out the
[demo repository](https://github.com/open-telemetry/opentelemetry-demo) for more
information, and to find the latest release.
110 changes: 110 additions & 0 deletions content/en/blog/2023/tyk-api-gateway/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: Tyk API Gateway's Native OpenTelemetry Integration
linkTitle: Tyk API Gateway's Native OpenTelemetry Integration
date: 2023-11-07
author: >-
[Sonja Chevre](https://github.com/SonjaChevre) (Tyk Technologies)
---

{{< blog/integration-badge >}}

We're excited to announce that
[Tyk API Gateway](https://github.com/TykTechnologies/tyk) has first-class
support for OpenTelemetry, with native instrumentation built directly into the
gateway. With Tyk's native OpenTelemetry support, developers and API platform
teams get end-to-end observability into their API traffic, enabling faster
troubleshooting and problem resolution.

## Why OpenTelemetry

API gateways, as the front-line proxies for APIs, play a crucial role in both
the management and security of API traffic. A multitude of critical actions
occur at the API gateway level. It is essential to monitor all requests,
including those that never reach the upstream services because of rate-limiting
rules, an authentication problem, or a caching mechanism. Collecting telemetry
data at the API Gateway gives a clear entrance point and a complete picture of
the journey of all the API consumers.

Before OpenTelemetry, Tyk Gateway already supported over 10 different formats
for exporting metrics, logs, and traces. Maintaining this support demanded
substantial engineering resources. OpenTelemetry streamlines this process,
enabling a more efficient and standardized approach to collecting and exporting
telemetry data. As a result, our users gain the flexibility to transmit their
telemetry data to an even broader array of
[observability tools and vendors](/ecosystem/vendors/).

We have now deprecated our support for OpenTracing in favor of OpenTelemetry for
distributed tracing and plan to leverage OpenTelemetry to streamline the export
of metrics and logs in the future.

## How to Integrate Tyk with OpenTelemetry

Starting with version 5.2,
[Tyk API Gateway has native support for OpenTelemetry distributed tracing](https://tyk.io/docs/product-stack/tyk-gateway/advanced-configurations/distributed-tracing/open-telemetry/open-telemetry-overview/).
Here is how to configure it, enable detailed tracing per API and instrumenting
custom plugins.

### Enable OpenTelemetry at Gateway Level

Edit Tyk Gateway configuration file to enable OpenTelemetry support, like this:

```json
{
"opentelemetry": {
"enabled": true
}
}
```

You can also enable OpenTelemetry by setting the corresponding environment
variable: `TYK_GW_OPENTELEMETRY_ENABLED=TRUE`.

By default, OpenTelemetry spans are exported using the gRPC protocol to
`localhost:4317`. For more configuration options and default values, refer to
the
[documentation](https://tyk.io/docs/tyk-oss-gateway/configuration/#opentelemetry).

Tyk will export two spans: one for the total duration of the API call and one
span for the call to the upstream service, as shown in the following screenshot
from Jaeger.

![Typ API Gateway distributed trace](tyk-api-gateway-opentelemetry-trace.png)

### Detailed tracing per APIs

Upon enabling OpenTelemetry at the gateway level, you gain the flexibility to
activate detailed tracing for particular APIs. To do so, simply adjust the
corresponding API definition and toggle the `detailed_tracing` option to either
`true` or `false`. The default value for this setting is `false`. With this
configuration, Tyk will generate a span for every middleware operation carried
out throughout the API request/response lifecycle. This includes actions like
API version validation, authentication, authorization, rate limiting, and
request and response transformation.

Here you can quickly spot an issue reported by the rate limiting middleware:

![Typ API Gateway distributed trace with middleware details](tyk-api-gateway-opentelemetry-trace-detail.png)

### Instrumenting custom plugins with OpenTelemetry

Tyk supports the use of custom plugins (also called custom middleware) to extend
its functionality, making it a highly flexible and customizable API gateway
solution. This extensibility allows developers to tailor Tyk to their specific
needs, whether it's for enhancing security, adding new authentication methods,
integrating with third-party services, or implementing custom request/response
transformations.

By instrumenting custom plugins with OpenTelemetry SDK or Tyk’s OpenTelemetry
library implementation (wrapper of the OpenTelemetry SDK that all Tyk components
are sharing for convenience), Tyk users can gain additional insights into their
custom plugin behavior for better monitoring and quicker troubleshooting. More
information in Tyk’s documentation:
[OpenTelemetry Instrumentation in Go Plugins](https://tyk.io/docs/product-stack/tyk-gateway/advanced-configurations/plugins/otel-plugins/).

## What's next?

Now that the
[first stable release of OTel Go metric SDK has been announced](/blog/2023/otel-go-metrics-sdk-stable/),
we will be investigating support for OpenTelemetry metrics. Stay tuned for
updates and don't hesitate to
[reach out on Tyk's community with any feedback](https://community.tyk.io/).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions content/en/docs/demo/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ aliases: [demo_features]
- **[Envoy](https://www.envoyproxy.io/)**: Envoy is used as a reverse proxy for
user-facing web interfaces such as the frontend, load generator, and feature
flag service.
- **[OpenSearch](https://opensearch.org/)**: OpenSearch is used to centralize
logging data from services.
28 changes: 28 additions & 0 deletions content/en/docs/demo/logging-features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Log Coverage by Service
linkTitle: Log Feature Coverage
aliases: [log_service_features]
---

| Service | Language | OTLP Logs |
| --------------- | --------------- | --------- |
| Accounting | Go | 🚧 |
| Ad | Java ||
| Cart | .NET ||
| Checkout | Go | 🚧 |
| Currency | C++ | 🚧 |
| Email | Ruby | 🚧 |
| Feature Flag | Erlang / Elixir | 🚧 |
| Fraud Detection | Kotlin | 🚧 |
| Frontend | TypeScript | 🚧 |
| Payment | JavaScript | 🚧 |
| Product Catalog | Go | 🚧 |
| Quote | PHP ||
| Recommendation | Python ||
| Shipping | Rust | 🚧 |

Emoji Legend:

- Completed: ✅
- Not Applicable: 🔕
- Not Present (Yet): 🚧
24 changes: 24 additions & 0 deletions static/refcache.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@
"StatusCode": 200,
"LastSeen": "2023-07-03T17:44:06.5954165Z"
},
"https://community.tyk.io/": {
"StatusCode": 200,
"LastSeen": "2023-10-26T12:18:59.472082+02:00"
},
"https://communityinviter.com/apps/cloud-native/cncf": {
"StatusCode": 200,
"LastSeen": "2023-06-29T15:55:08.258786-04:00"
Expand Down Expand Up @@ -1915,6 +1919,14 @@
"StatusCode": 200,
"LastSeen": "2023-06-30T09:43:05.833301-04:00"
},
"https://github.com/SonjaChevre": {
"StatusCode": 200,
"LastSeen": "2023-10-26T12:18:57.59078+02:00"
},
"https://github.com/TykTechnologies/tyk": {
"StatusCode": 200,
"LastSeen": "2023-10-26T12:18:58.23681+02:00"
},
"https://github.com/Workiva/opentelemetry-dart": {
"StatusCode": 200,
"LastSeen": "2023-06-30T08:34:38.397928-04:00"
Expand Down Expand Up @@ -4519,6 +4531,10 @@
"StatusCode": 206,
"LastSeen": "2023-06-29T18:37:49.266869-04:00"
},
"https://opensearch.org/": {
"StatusCode": 206,
"LastSeen": "2023-11-03T10:07:17.047111-04:00"
},
"https://opentelemetry-cpp.readthedocs.io/en/latest/otel_docs/namespace_opentelemetry__metrics.html": {
"StatusCode": 200,
"LastSeen": "2023-06-29T18:48:28.97257-04:00"
Expand Down Expand Up @@ -5403,6 +5419,14 @@
"StatusCode": 206,
"LastSeen": "2023-09-19T18:15:55.842511+02:00"
},
"https://tyk.io/docs/product-stack/tyk-gateway/advanced-configurations/plugins/otel-plugins/": {
"StatusCode": 206,
"LastSeen": "2023-10-26T12:18:59.024513+02:00"
},
"https://tyk.io/docs/tyk-oss-gateway/configuration/#opentelemetry": {
"StatusCode": 206,
"LastSeen": "2023-10-26T12:18:58.666794+02:00"
},
"https://ucum.org/ucum.html#para-curly": {
"StatusCode": 200,
"LastSeen": "2023-06-29T18:39:26.73908-04:00"
Expand Down

0 comments on commit 25176c0

Please sign in to comment.