-
Notifications
You must be signed in to change notification settings - Fork 842
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
Add opentelemetry.io docs #2051
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2051 +/- ##
=======================================
Coverage 93.03% 93.03%
=======================================
Files 154 154
Lines 5976 5976
Branches 1246 1246
=======================================
Hits 5560 5560
Misses 416 416 |
Currently we have markdownlint failures; I'd be happy to either
But am unsure which we would prefer. Would fixing up the issues to pass this repo's markdownlint cause merge conflicts in the future? |
How would it cause merge conflicts? I would prefer the issues to be fixed if possible |
I don't expect there to be a huge merge conflict issue once the initial syncing is done (because this will become the authoritative source), but I do wonder if it'd cause unexpected display issues after they're merged back to the website. |
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.
plugins are gonna be removed very soon so I would encourage to replace all usage with
@opentelemetry/plugin-*
to equivalent of @opentelemetry/instrumentation-*
and then registerInstrumentations
You might want to wait a few days with this as I will be removing plugins after the next release and will update examples and readme.md files too .
|
||
// Minimum required setup - supports only synchronous operations | ||
const provider = new WebTracerProvider({ | ||
plugins: [ |
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.
this is outdated and will not work. The tracers doesn't support the plugins options any, please use.
import 'regenerator-runtime/runtime'
import { LogLevel } from "@opentelemetry/core";
import { WebTracerProvider } from '@opentelemetry/web';
import { DocumentLoad } from '@opentelemetry/plugin-document-load';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
const provider = new WebTracerProvider();
provider.register();
registerInstrumentations({
tracerProvider: provider,
instrumentations: [
new DocumentLoad()
],
});
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing'; | ||
|
||
// Minimum required setup - supports only synchronous operations | ||
const provider = new WebTracerProvider({ |
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.
registerInstrumentations ....
const { NodeTracerProvider } = require("@opentelemetry/node"); | ||
|
||
const provider = new NodeTracerProvider({ | ||
logLevel: LogLevel.ERROR |
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.
logLevel is removed, please use
api.diag.setLogger(new api.DiagConsoleLogger(), api.DiagLogLevel.ERROR);
const { SimpleSpanProcessor, ConsoleSpanExporter } = require("@opentelemetry/tracing"); | ||
|
||
const provider = new NodeTracerProvider({ | ||
logLevel: LogLevel.ERROR |
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.
logLevel was removed
@obecny I think this is just a direct copy of what is already on the website. We should merge it, then make more substantive changes ourselves, then mirror those changes over to the website. |
ohh now I see it make sense |
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.
created an issue to update docs #2070
Per open-telemetry/opentelemetry.io#472, we're mirroring the docs content on the website to each SIG. When a release occurs and these docs are updated, please make an issue or PR mirroring them to their appropriate location in the website repo (https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/js).