-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: RedwoodJS Studio & OpenTelemetry (Dev) #7829
Conversation
…into jgmw-experiment-otel-framework
…into jgmw-experiment-otel-framework
Hey @thedavidprice, yeah I made the following changes which should have hopefully moved this in the direction you requested:
[experimental.opentelemetry]
enabled = true
apiSdk = "/home/josh/Development/redwood-test-project/api/src/opentelemetry.js"
experimental-command-demo.mp4This should provide the following benefits:
I will update the readme to be explicit in its "experimental" status and will also add links to forum pages for both CLI commands. Sound/look good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Josh-Walker-GM Yes to all the above! Screen recording is exciting 🚀
My only 2¢ is to provide an alias for the yarn rw experimental [command]
so users could type in something like yarn rw exp [command]
. I defer to you.
Plan == approved.
Alias is a good idea! Added it in as |
RedwoodJS Studio [Experimental]
This PR adds the initial experimental version of a "RedwoodJS Studio". This is a CLI command
yarn rw experimental studio
which spawns a development studio which users can use to gain insights into their project via the OpenTelemetry instrumentation.For documentation and discussion please see the forum post:
https://community.redwoodjs.com/t/redwood-studio-experimental/4771
Features
Setup / Requirements
There is not explicit setup of the studio required. You will need to have setup OpenTelemetry to enable the studio to gather the data it uses to provide you with insights into your project. The studio accepts OpenTelemetry tracing data at
http://localhost:4318/v1/traces
.Config
We have adding some optional settings to the redwood.toml file. See below for the options added with descriptions of their purpose.
OpenTelemetry Support [Experimental]
This PR also adds support for OpenTelemetry instrumentation of components of the framework. It exposes a setup command which generated the boilerplate needed to gather instrumentation from the API side of a redwood project:
yarn rw experimental setup opentelemetry
For documentation and discussion please see the forum post:
https://community.redwoodjs.com/t/opentelemetry-support-experimental/4772
Features
Setup / Requirements
yarn rw experimental setup opentelemetry
should perform all the necessary setup needed to enable gathering OpenTelemetry traces from your project.This will add the necessary dependencies to your project and produce an
opentelemetry.ts|js
file within your API side. This file is where your SDK is setup to collect and export the telemetry generated by your Redwood app. By default your telemetry will be exported tohttp://localhost:4318/v1/traces
you can change to suit your needs. This is the location that Redwood Studio will listen for traces so leave this as the default if you wish to use the studio.Config
You should be able to configure the behaviour of OpenTelemetry from within the
opentelemetry.ts|js
file which was generated. There is one additional TOML field which will be setup which is used to inform Redwood of where this setup file lives:Pull Request - Outstanding Work
Avoid CORS setup needed by graphiql by using an API proxy on the studio backend.Conditionally enable the opentelemetry wrapping babel plugin - only if user wants/has otel enabled.Fix/rework the graphql-server resolver wrapping.RedwoodJS StudioOpenTelemetry setupPing: @dthyresson