Skip to content

Commit 18eda21

Browse files
robinbraemerrenovate[bot]TheViharaIzzy-IrvineNixNux123
authored
feat(WIP): add opentelemetry (minekube#439)
* feat(WIP): add otel still needs making it configurable and having an optional /metrics endpoint instead of pushing * add docs and improve env config * fix(docs): links * fix(deps): update module github.com/robinbraemer/event to v0.1.1 (minekube#440) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update grpc-java monorepo to v1.68.2 (minekube#441) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.0 (minekube#442) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.0 (minekube#443) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency io.grpc:grpc-netty-shaded to v1.68.2 (minekube#444) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_grpc_java to v1.68.2.1.20241118150055.50fffb007499 (minekube#446) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_protocolbuffers_java to v29 (minekube#447) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency go to v1.23.4 (minekube#449) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update golang docker tag to v1.23.4 (minekube#450) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/sync to v0.10.0 (minekube#451) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/text to v0.21.0 (minekube#452) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.68.1 (minekube#453) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.1 (minekube#454) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.1 (minekube#455) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.32.0 (minekube#457) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_protocolbuffers_java to v29.1.0.1.20241118150055.50fffb007499 (minekube#458) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: Support Minecraft_1_21_4 * feat(connect): add CONNECT_TOKEN env var * fix(deps): update module go.minekube.com/common to v0.0.6 (minekube#460) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update grpc-java monorepo to v1.69.0 (minekube#461) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module go.minekube.com/gate to v0.46.0 (minekube#462) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_grpc_java to v1.69.0.1.20241118150055.50fffb007499 (minekube#463) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.69.0 (minekube#464) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.33.0 [security] (minekube#466) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update events.go * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.2 (minekube#467) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.2 (minekube#468) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.69.2 (minekube#469) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @bufbuild/buf to v1.48.0 (minekube#470) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_protocolbuffers_java to v29.2.0.1.20241118150055.50fffb007499 (minekube#471) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.10.1 (minekube#472) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.0-20241120101512-f1a10b5029ce.1 (minekube#473) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.36.0 (minekube#474) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.36.1 (minekube#475) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.1-20241120101512-f1a10b5029ce.1 (minekube#476) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.36.2 (minekube#478) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.2-20241120101512-f1a10b5029ce.1 (minekube#479) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.34.0 (minekube#480) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @bufbuild/buf to v1.49.0 (minekube#481) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/connectrpc/go to v1.18.1-20241120101512-f1a10b5029ce.1 (minekube#482) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.3 (minekube#483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat(Lite): Allow configuring players in fallback status response minekube#281 (minekube#477) * feat(Lite): Allow configuring players in fallback status response minekube#281 * chore: Reuse ping.Players struct * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.29.3 (minekube#484) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.69.4 (minekube#485) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_protocolbuffers_java to v29.3.0.1.20241118150055.50fffb007499 (minekube#486) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module connectrpc.com/connect to v1.18.1 (minekube#487) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module go.minekube.com/gate to v0.47.0 (minekube#488) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/time to v0.9.0 (minekube#489) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.3-20241120101512-f1a10b5029ce.1 (minekube#490) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.36.3 (minekube#491) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency go to v1.23.5 (minekube#492) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update golang docker tag to v1.23.5 (minekube#493) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update grpc-java monorepo to v1.69.1 (minekube#494) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_grpc_java to v1.69.1.1.20241118150055.50fffb007499 (minekube#495) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @bufbuild/buf to v1.50.0 (minekube#496) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update grpc-java monorepo to v1.70.0 (minekube#497) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.70.0 (minekube#498) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/protobuf to v1.36.4 (minekube#499) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.4-20241120101512-f1a10b5029ce.1 (minekube#500) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_grpc_java to v1.70.0.1.20241118150055.50fffb007499 (minekube#501) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.36.0 [security] (minekube#508) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: config path in k8s examples (minekube#511) * docs: Updated Connect Integration Guide (minekube#509) * Updated Connect Integration Guide * Added tip that the dashboard step is optional * fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.10.2 (minekube#512) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.38.0 [security] (minekube#513) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: Support Minecraft 1.21.5 * chore(deps): update Go version to 1.24.1 and dependencies in go.mod and go.sum * fix(deps): resolve merge conflicts and update dependencies in go.mod and go.sum * refactor: Clean up formatting and whitespace in various files [skip ci] * refactor: Enhance error handling and validation in channel identifier logic - Increased RSA key size from 512 to 1024 bits for improved security. - Introduced specific error variables for namespace and name validation. - Updated `NewChannelIdentifier` to use new error variables. - Improved `ChannelIdentifierFrom` to handle additional cases and provide clearer error messages. - Added helper functions for character validation in namespace and value identifiers. * chore: update Go version in Dockerfile to 1.24.1 * feat: Enhance installation script for cross-platform support - Updated default installation and temporary directories based on the operating system. - Added functions to manage environment variables and update the system PATH permanently. - Improved error handling for file downloads and checksum verification. - Enhanced architecture and OS detection methods for better reliability. - Introduced a success message function to guide users post-installation. [skip ci] * fix(deps): update dependency @bufbuild/protobuf to v1.10.1 (minekube#516) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update golang docker tag to v1.24.2 (minekube#517) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency io.grpc:grpc-kotlin-stub to v1.4.3 (minekube#518) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module buf.build/gen/go/minekube/gate/protocolbuffers/go to v1.36.6-20241120101512-f1a10b5029ce.1 (minekube#519) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency build.buf.gen:minekube_gate_grpc_java to v1.72.0.1.20241118150055.50fffb007499 (minekube#520) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency com.google.protobuf:protobuf-java to v4.30.2 (minekube#521) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update grpc-java monorepo to v1.72.0 (minekube#523) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module github.com/go-faker/faker/v4 to v4.6.0 (minekube#524) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module go.minekube.com/gate to v0.48.1 (minekube#525) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/net to v0.39.0 (minekube#526) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module github.com/go-faker/faker/v4 to v4.6.1 (minekube#528) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module golang.org/x/time to v0.11.0 (minekube#529) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update module google.golang.org/grpc to v1.72.0 (minekube#530) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(network): fix AvailableCommands packet for mods (minekube#534) * fix(network): fix AvailableCommands packet for mods Fixes: minekube#322 Closes: minekube#527 Co-authored-by: @uberswe * test(util): enhance ReadVarInt tests with additional cases and fuzzing - Expanded unit tests for ReadVarInt to cover various scenarios including edge cases like maximum varint, empty buffer, and incomplete varint. - Added fuzz testing for ReadVarInt to ensure robustness against malformed input. - Introduced a benchmark for ReadVarInt to measure performance. * revert to original ReadVarInt * update go.sum * fix: lint --------- Co-authored-by: Román Benjámin <svetch.game@gmail.com> * feat(WIP): add otel still needs making it configurable and having an optional /metrics endpoint instead of pushing * add docs and improve env config * feat(docs): add FAQ section and update navigation Added a new FAQ page for OpenTelemetry, addressing common questions and providing guidance on scalable setups. Updated the navigation to include a link to the new FAQ section. * feat: enhance packet reading with byte count tracking Updated the packet reading process to include the number of bytes read during decoding. This change introduces a new `BytesRead` field in the `PacketContext` struct and modifies the `readPayload` and `ReadVarInt` functions to return the byte count. Additionally, integrated OpenTelemetry tracing in the `startReadLoop` method to monitor packet handling more effectively. * fix(deps): update OpenTelemetry dependencies and related modules Updated OpenTelemetry modules to v1.34.0, including core, metric, and trace packages. Adjusted indirect dependencies for improved compatibility and performance. Additionally, modified the `decoder.go` file to return the byte count in error messages during payload reading, enhancing error reporting. * go mod tidy * feat(otel): update OpenTelemetry dependencies to v1.35.0 and add Prometheus metrics server Updated OpenTelemetry modules to v1.35.0, including core, metric, and trace packages. Introduced a new HTTP server for Prometheus metrics, configurable via environment variables. Enhanced the OpenTelemetry initialization to support metrics collection and server management. Updated documentation to reflect new environment variables for metrics configuration. * feat(docs): add 'Self-hosted' link to OpenTelemetry navigation * feat(docs): enhance OpenTelemetry self-hosted guide with configuration details and add sample Grafana dashboard Updated the self-hosted OpenTelemetry documentation to include detailed configuration steps for Grafana, Prometheus, and Tempo. Added a new section for a sample Grafana dashboard to visualize metrics from Gate. Introduced quick start instructions for obtaining configuration files across different scenarios, ensuring users have clear guidance for setup. * feat(api): integrate OpenTelemetry interceptor into Gate service handler Added an OpenTelemetry interceptor to the Gate service handler for enhanced tracing capabilities. This change improves observability by allowing the collection of telemetry data during API requests. Error handling for interceptor initialization is also included. * feat(docs): update OpenTelemetry self-hosted guide with new metrics and dashboard features Enhanced the self-hosted OpenTelemetry documentation by adding a sample Grafana dashboard for visualizing metrics from Gate. Updated configuration details for the OpenTelemetry Collector, including new metrics endpoints and improved instructions for setting up Prometheus scraping. Removed outdated Kubernetes configuration examples and added new YAML files for the OpenTelemetry Collector setup. Updated the documentation to reflect changes in metrics collection and visualization capabilities. * chore(deps): update Go module dependencies and documentation configuration Added the `connectrpc.com/otelconnect` dependency to the Go module and updated the `go.sum` file accordingly. Removed outdated Prometheus-related dependencies and updated the `go.mod` file to reflect the latest versions. Additionally, modified the VitePress configuration to ignore dead links for localhost, enhancing the documentation experience. * fix(docs): update OpenTelemetry self-hosted guide for Jaeger configuration Revised the Jaeger configuration in the self-hosted OpenTelemetry documentation. Updated the OTLP endpoint to use port 4318 and changed the protocol to "http/protobuf". Disabled metrics export as Jaeger does not support it, ensuring clarity in the setup instructions. [skip ci] * feat(docs): enhance OpenTelemetry self-hosted guide with new configuration files and metrics setup Added new configuration files for OpenTelemetry Collector in both push and pull models, along with updated Prometheus configurations. Revised the self-hosted guide to clarify setup instructions and included details on how to send telemetry data from Gate. Updated Grafana dashboard expressions to align with the new metrics structure, ensuring accurate data visualization. [skip ci] * feat(docs): update Grafana dashboard for Gate overview with new data sources and visualization options Refactored the Gate overview dashboard JSON configuration to remove deprecated inputs and enhance visualization features. Added support for Tempo as a new data source, updated panel options for better display, and ensured compatibility with the latest Grafana plugin version. Improved overall structure and clarity of the dashboard configuration. * feat(docs): expand OpenTelemetry self-hosted guide with new Grafana and Jaeger configurations Added a comprehensive guide for setting up a self-hosted Grafana, Prometheus, and Tempo stack, including detailed configuration files and instructions. Introduced a new section for self-hosted Jaeger setup, clarifying how to send traces from Gate. Updated navigation links in the documentation to reflect these additions, enhancing the overall user experience and observability capabilities. * fix(docs): update links in OpenTelemetry self-hosted guide for Grafana and Jaeger Corrected the links in the OpenTelemetry self-hosted guide to point to the appropriate Markdown files for the Grafana Stack and Jaeger setup. This ensures users are directed to the correct resources for configuring their self-hosted observability solutions. * fix(docs): update Google Cloud product name in OpenTelemetry guide Replaced the outdated name "Google Cloud Operations Suite" with the current name "Google Cloud Observability" in the OpenTelemetry documentation. This ensures that users have the most accurate and up-to-date information regarding Google Cloud's monitoring and diagnostics services. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alen Gorenjec <gorenjecalen@gmail.com> Co-authored-by: Izzy Irvine <18374196+Izzy-Irvine@users.noreply.github.com> Co-authored-by: NixNux123 <nixnux123@fynncraft.de> Co-authored-by: Román Benjámin <svetch.game@gmail.com>
1 parent 7f683a6 commit 18eda21

46 files changed

Lines changed: 2008 additions & 83 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/launch.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "debug",
12+
"program": "${workspaceFolder}/gate.go",
13+
"args": ["-d"],
14+
"console": "integratedTerminal"
15+
},
16+
{
17+
"name": "Debug with OTEL (Self-hosted)",
18+
"type": "go",
19+
"request": "launch",
20+
"mode": "debug",
21+
"program": "${workspaceFolder}/gate.go",
22+
"args": ["-d"],
23+
"console": "integratedTerminal",
24+
"env": {
25+
"OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4318",
26+
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
27+
"OTEL_TRACES_ENABLED": "true",
28+
"OTEL_METRICS_ENABLED": "true",
29+
"OTEL_SERVICE_NAME": "gate-dev"
30+
}
31+
}
32+
]
33+
}

.web/docs/.vitepress/config.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ export default defineConfig({
4848
],
4949

5050
vue: {
51-
reactivityTransform: true,
51+
// reactivityTransform: true, // This option is deprecated
5252
},
5353

54+
ignoreDeadLinks: 'localhostLinks',
55+
5456
themeConfig: {
5557
logo: '/minekube-logo.png',
5658

@@ -176,6 +178,44 @@ export default defineConfig({
176178
},
177179
],
178180
},
181+
{
182+
text: 'OpenTelemetry',
183+
items: [
184+
{
185+
text: 'Overview',
186+
link: '/guide/otel/',
187+
},
188+
{
189+
text: 'Grafana',
190+
items: [
191+
{
192+
text: 'Grafana Cloud',
193+
link: '/guide/otel/grafana-cloud/',
194+
},
195+
{
196+
text: 'Self-hosted Grafana Stack',
197+
link: '/guide/otel/self-hosted/grafana-stack.md',
198+
},
199+
{
200+
text: 'Grafana Dashboards',
201+
link: '/guide/otel/self-hosted/dashboard',
202+
},
203+
],
204+
},
205+
{
206+
text: 'Honeycomb',
207+
link: '/guide/otel/honeycomb/',
208+
},
209+
{
210+
text: 'Self-hosted Jaeger',
211+
link: '/guide/otel/self-hosted/jaeger',
212+
},
213+
{
214+
text: 'FAQ',
215+
link: '/guide/otel/faq/',
216+
},
217+
],
218+
},
179219
{
180220
text: 'Security',
181221
items: [

.web/docs/guide/otel/faq.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# OpenTelemetry FAQ
2+
3+
This FAQ addresses common questions about using OpenTelemetry with Gate, particularly in conjunction with Grafana Mimir, Grafana Tempo, and the OpenTelemetry Collector.
4+
5+
## What does a recommended scalable OpenTelemetry setup for Gate look like?
6+
7+
A recommended scalable setup involves:
8+
9+
1. **Gate**: Your application, instrumented with OpenTelemetry, emitting metrics and traces via OTLP.
10+
2. **OpenTelemetry Collector**: Receives OTLP data from Gate, processes it (batching, filtering, enrichment), and exports it.
11+
3. **Grafana Mimir**: A scalable, long-term storage backend for metrics, receiving data from the OTel Collector (e.g., via Prometheus remote write or OTLP). It's queried using PromQL.
12+
4. **Grafana Tempo**: A scalable backend for traces, receiving OTLP traces from the OTel Collector.
13+
5. **Grafana OSS**: The visualization platform, connecting to Mimir (for metrics) and Tempo (for traces).
14+
15+
The data flow generally looks like this:
16+
`Gate (OTLP) -> OTel Collector -> Grafana Mimir (Metrics) & Grafana Tempo (Traces) -> Grafana OSS (Visualization)`
17+
18+
## In a setup with Grafana Mimir, is a separate Prometheus server still deployed?
19+
20+
Generally, no. Grafana Mimir takes on the role of the scalable metrics backend, handling storage and PromQL querying. You wouldn't typically deploy and manage a separate, standalone Prometheus server for its own data storage in this scenario. However, Prometheus concepts and technologies are still integral:
21+
22+
- **PromQL**: Used to query metrics from Mimir.
23+
- **Exposition Format**: Applications might still expose metrics in the Prometheus format.
24+
- **Collection Mechanisms**: The OTel Collector might use its Prometheus receiver, or Mimir ingests data via Prometheus remote write.
25+
26+
Mimir effectively becomes your Prometheus-compatible, scalable metrics datastore and query engine.
27+
28+
## What is the role of the OpenTelemetry Collector? Can applications like Gate push data directly to backends like Prometheus or Mimir?
29+
30+
The OpenTelemetry Collector is a crucial component that acts as a telemetry processing and routing pipeline. While some backends (including newer versions of Prometheus and potentially Mimir) can accept OTLP data directly, the Collector offers significant advantages:
31+
32+
- **Decoupling**: Applications only need to send data to the Collector, which then handles routing to various backends. This simplifies application configuration and makes it easier to change or add backends.
33+
- **Processing**: The Collector can batch data for efficiency, filter unwanted telemetry, enrich data with additional attributes (e.g., Kubernetes metadata), and handle export retries.
34+
- **Protocol Translation**: It can convert telemetry data between different protocols if needed.
35+
- **Standardization**: It promotes a standardized way of handling telemetry data before it reaches the backends.
36+
37+
For these reasons, even if direct sending is possible, using the OTel Collector is often the recommended approach for flexibility and robustness.
38+
39+
## How do Grafana Mimir and Grafana Tempo fit into this?
40+
41+
- **Grafana Mimir**: Serves as a highly scalable, long-term storage solution for Prometheus metrics. It addresses potential scaling limitations of a single Prometheus instance for large data volumes and long retention periods. It remains compatible with PromQL for querying.
42+
- **Grafana Tempo**: Is a highly scalable, easy-to-operate distributed tracing backend. It's optimized for ingesting and retrieving traces by ID and integrates well with Grafana for visualization and correlation with metrics and logs.
43+
44+
## Why does my OpenTelemetry `service.name` appear as the `job` label in Prometheus?
45+
46+
When you send telemetry from an application (like Gate) instrumented with OpenTelemetry to an OpenTelemetry Collector, and then the Collector forwards this data to Prometheus (typically using the `prometheusremotewrite` exporter), a common and intentional translation occurs:
47+
48+
1. **OTLP Transmits Resource Attributes**: Your application sends `service.name` (along with other details like `service.version`, `host.name`, etc.) as "resource attributes" within the OTLP (OpenTelemetry Protocol) data. These attributes describe the entity generating the telemetry.
49+
50+
2. **Collector's Role (`prometheusremotewrite` Exporter)**: The OpenTelemetry Collector receives this OTLP data. When configured to send metrics to Prometheus, its `prometheusremotewrite` exporter takes on the task of converting the OpenTelemetry data model into the format Prometheus understands.
51+
52+
3. **Default Convention: `service.name` to `job`**: By default, and in line with common Prometheus conventions, this exporter maps the OpenTelemetry `service.name` resource attribute to the `job` label in Prometheus. Similarly, `service.instance.id` is often mapped to the `instance` label.
53+
54+
**In essence, if you see `job="your-service-name"` in Prometheus, this _is_ your OpenTelemetry `service.name` attribute.** It has been translated to the standard Prometheus `job` label, which is the conventional way to identify a service or application in Prometheus.
55+
56+
You generally do **not** need to add special processing in the Collector (e.g., using an `attributes` processor) to achieve this mapping; it's a standard behavior of the `prometheusremotewrite` exporter. This design choice simplifies integration and aligns with how Prometheus users typically organize and query their metrics.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Grafana Cloud
2+
3+
[Grafana Cloud](https://grafana.com/products/cloud/) is a fully managed observability platform that supports OpenTelemetry. Follow these steps to set up Gate with Grafana Cloud:
4+
5+
1. **Create a Grafana Cloud Account**
6+
7+
- Sign up at [Grafana.com](https://grafana.com/auth/sign-up/create-user)
8+
- Navigate to your organization
9+
- Create an Access Policy with write permissions at [Access Policies](https://grafana.com/orgs/your-org/access-policies)
10+
- Generate and save your API token
11+
12+
2. **Configure Stack**
13+
14+
Navigate to your Grafana Cloud Stack (e.g., grafana.com/orgs/your-org/stacks/xxxxx) and:
15+
16+
- Click "Send Traces" in the Tempo section to get your traces endpoint
17+
- Click "Send Metrics" in the Prometheus section to get your metrics endpoint
18+
19+
![Stack](./stack.png)
20+
21+
3. **Prepare Your Authentication**
22+
23+
You'll need to encode your credentials in base64 format. Use one of these methods:
24+
25+
- Using the command line:
26+
27+
```bash
28+
echo "YOUR_INSTANCE_ID:YOUR_API_TOKEN" | base64
29+
```
30+
31+
- Or visit an online base64 encoder like [base64encode.org](https://www.base64encode.org/)
32+
33+
4. **Configure Gate**
34+
35+
Export the following environment variables before starting Gate:
36+
37+
```bash
38+
# For traces (Tempo)
39+
export OTEL_EXPORTER_OTLP_ENDPOINT="https://tempo-prod-XX-prod-XX-XXXXX.grafana.net/tempo"
40+
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic YOUR_BASE64_ENCODED_CREDENTIALS"
41+
42+
# For metrics (Prometheus)
43+
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
44+
export OTEL_METRICS_EXPORTER="otlp"
45+
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="https://prometheus-prod-XX-prod-XX-XXXXX.grafana.net/api/prom/push"
46+
export OTEL_EXPORTER_OTLP_METRICS_HEADERS="Authorization=Basic YOUR_BASE64_ENCODED_CREDENTIALS"
47+
```
48+
49+
::: tip
50+
For production deployments, consider setting these environment variables in your system configuration or container orchestration platform rather than exporting them manually.
51+
:::
52+
53+
5. **Start Gate**
54+
55+
Once the environment variables are set, start Gate normally. It will automatically begin sending telemetry data to Grafana Cloud.
56+
57+
```bash
58+
gate
59+
```
60+
61+
See [Install](/guide/install/) for more information on how to start Gate.
62+
63+
6. **View Your Data**
64+
65+
Log into your Grafana Cloud account and click on the "Launch" button for Grafana:
66+
67+
- Navigate to the Tempo service to view your traces
68+
- Navigate to the Prometheus service to view your metrics
69+
70+
![Launch](./launch.png)
71+
72+
- Go to the "Explore" section and select "Tempo" to in the sources
73+
74+
![tempo-source](./tempo-source.png)
75+
76+
![Trace](./trace.png)
77+
78+
- Or select "Prometheus" to view your metrics
13.4 KB
Loading
40.9 KB
Loading
26 KB
Loading
191 KB
Loading
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Honeycomb
2+
3+
[Honeycomb](https://www.honeycomb.io/) is an OpenTelemetry-compatible observability platform that requires minimal setup - just sign up, create an environment, and get your API key to start collecting telemetry data. Here's how to get started:
4+
5+
1. **Create a Honeycomb Account**
6+
7+
- Sign up at [Honeycomb.io](https://ui.honeycomb.io/signup)
8+
- Create a new environment (or use an existing one)
9+
- Get your API key from Environment Settings
10+
11+
2. **Configure Gate**
12+
13+
Export the following environment variables before starting Gate:
14+
15+
::: code-group
16+
17+
```bash [US Region]
18+
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.honeycomb.io:443"
19+
export OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=your-api-key"
20+
```
21+
22+
```bash [EU Region]
23+
export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.eu1.honeycomb.io:443"
24+
export OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=your-api-key"
25+
```
26+
27+
:::
28+
29+
::: tip
30+
For production deployments, consider setting these environment variables in your system configuration or container orchestration platform rather than exporting them manually.
31+
:::
32+
33+
3. **Start Gate**
34+
35+
Once the environment variables are set, start Gate normally. It will automatically begin sending telemetry data to Honeycomb.
36+
37+
```bash
38+
gate
39+
```
40+
41+
See [Install](/guide/install/) for more information on how to start Gate.
42+
43+
4. **View Your Data**
44+
45+
Log into your Honeycomb account and navigate to your environment. You should see your Gate service appearing in the list of services, and you can start creating queries and visualizations to analyze your data.
46+
47+
![Trace](trace.png)
48+
49+
![Metric](metric.png)
205 KB
Loading

0 commit comments

Comments
 (0)