graphql-engine/server/src-lib/Hasura/RQL/DDL
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
..
Action chore(server): remove TH aeson, separate lenses, in Hasura.RQL.DDL 2023-04-28 15:13:32 +00:00
Metadata Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Permission chore(server): permissions for inline logical models 2023-07-25 10:11:35 +00:00
Relationship Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Schema INFRA-833: OpenTelemetry exporter for metrics 2023-07-26 05:22:17 +00:00
Webhook Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Action.hs server: add support for header resolution from env vars 2023-06-23 08:39:28 +00:00
ApiLimit.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
ComputedField.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
ConnectionTemplate.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
CustomTypes.hs Fix parsing of scalar types in the DataConnector backend 2023-06-21 06:50:51 +00:00
DataConnector.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Endpoint.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
EventTrigger.hs server: add support for header resolution from env vars 2023-06-23 08:39:28 +00:00
GraphqlSchemaIntrospection.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Headers.hs server: add support for header resolution from env vars 2023-06-23 08:39:28 +00:00
InheritedRoles.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Metadata.hs chore(server): permissions for inline logical models 2023-07-25 10:11:35 +00:00
Network.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
OpenTelemetry.hs INFRA-833: OpenTelemetry exporter for metrics 2023-07-26 05:22:17 +00:00
Permission.hs chore(server): permissions for inline logical models 2023-07-25 10:11:35 +00:00
QueryCollection.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
QueryTags.hs chore(server): remove TH aeson, separate lenses, in Hasura.RQL.DDL 2023-04-28 15:13:32 +00:00
Relationship.hs Add *_drop_relationship to bulk_atomic 2023-07-13 08:54:51 +00:00
RemoteRelationship.hs Support remote relationship deletion in bulk_atomic 2023-07-13 13:55:25 +00:00
ScheduledTrigger.hs server: add support for header resolution from env vars 2023-06-23 08:39:28 +00:00
Schema.hs chore(server): move table related things to Hasura.Table.* 2023-05-17 08:55:32 +00:00
SchemaRegistry.hs server: add new fields in schema registry payload 2023-07-18 12:03:17 +00:00
SourceKinds.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00
Warnings.hs Upgrade Ormolu to 0.7.0.0 2023-05-24 13:53:53 +00:00