graphql-engine/docs
Brandon Simmons f0441a3d61 INFRA-833: OpenTelemetry exporter for metrics
I scratched out some changes to support this in the front end, mostly to test it easily,   maybe this can be used without much rework (validation seems to work correctly, but the tests need to be extended and probably fixed):

<img width="648" alt="fd" src="https://github.com/hasura/graphql-engine-mono/assets/68095256/e5873a90-ef83-43c3-9d54-cfc0a693baca">

-------

## Fake OTel collector for testing

ChatGPT spit this out, and it's what I used to test, if it's useful to others:

``` python
from flask import Flask, request
from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ExportTraceServiceRequest
from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ExportMetricsServiceRequest
import google.protobuf.json_format as json_format

app = Flask(__name__)

@app.route("/v1/traces", methods=["POST"])
def handle_traces():
    if request.method == 'POST':
        binary_trace = request.get_data()
        trace_request = ExportTraceServiceRequest()
        trace_request.ParseFromString(binary_trace)
        print("Received trace data:\n")
        print(json_format.MessageToJson(trace_request, indent=2, preserving_proto_field_name=True))
        return "Trace data received", 200

@app.route("/v1/metrics", methods=["POST"])
def handle_metrics():
    if request.method == 'POST':
        binary_metric = request.get_data()
        metric_request = ExportMetricsServiceRequest()
        metric_request.ParseFromString(binary_metric)
        print("Received metrics data:\n")
        print(json_format.MessageToJson(metric_request, indent=2, preserving_proto_field_name=True))
        return "Metrics data received", 200

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8080)
```

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9552
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
Co-authored-by: Daniele Cammareri <5709409+dancamma@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: f340bfc5c135a7bb24735b524d015e05db422fd2
2023-07-26 05:22:17 +00:00
..
.yarn/releases Updates Docusaurus to 2.1 2022-11-18 16:02:38 +00:00
docs INFRA-833: OpenTelemetry exporter for metrics 2023-07-26 05:22:17 +00:00
public docs: move docs-new to docs 2022-04-13 12:01:50 +00:00
scripts docs: epic restructure 2022-07-20 16:36:00 +00:00
src docs: backport hotfix for nested sidebar rules 2023-07-24 13:44:04 +00:00
static INFRA-833: OpenTelemetry exporter for metrics 2023-07-26 05:22:17 +00:00
wiki docs: add prettier 2023-07-21 12:52:40 +00:00
.dockerignore Build configs for preview builds through GKE 2022-11-23 14:18:37 +00:00
.gitignore docs: add spellchecking 2023-01-17 10:32:11 +00:00
.prettierignore docs: add prettier 2023-07-21 12:52:40 +00:00
.prettierrc docs: add prettier 2023-07-21 12:52:40 +00:00
.prettierrc.json docs: optimize code elements inside tables 2023-02-02 20:00:42 +00:00
.yarnrc.yml Updates Docusaurus to 2.1 2022-11-18 16:02:38 +00:00
babel.config.js docs: move docs-new to docs 2022-04-13 12:01:50 +00:00
CODESPACES.md docs: add docs devcontainer 2022-12-16 17:39:29 +00:00
CONTRIBUTING.md docs: capitalize hasura features 2022-12-19 20:03:55 +00:00
cspell.config.yaml docs: EE console SSO troubleshooting and improvements 2023-07-05 14:20:22 +00:00
Dockerfile Build configs for preview builds through GKE 2022-11-23 14:18:37 +00:00
docusaurus.config.js docs: add prettier 2023-07-21 12:52:40 +00:00
package-lock.json docs: add import from openAPI doc 2022-12-15 18:39:56 +00:00
package.json docs: add prettier 2023-07-21 12:52:40 +00:00
preview_cloud_build.yaml Build configs for preview builds through GKE 2022-11-23 14:18:37 +00:00
README.md Fix broken links 2022-10-26 14:22:19 +00:00
sidebars.js docs: add prettier 2023-07-21 12:52:40 +00:00
sidebarsWiki.js docs: add prettier 2023-07-21 12:52:40 +00:00
spell_add.sh docs: add spellchecking 2023-01-17 10:32:11 +00:00
spell_check.sh docs: add spellchecking 2023-01-17 10:32:11 +00:00
tsconfig.json docs: move docs-new to docs 2022-04-13 12:01:50 +00:00
yarn.lock docs: add prettier 2023-07-21 12:52:40 +00:00

README.md

Info

The most up-to-date information for the docs site can be found on our wiki. You can access the wiki on the live docs site, or directly within this repository.