-
Notifications
You must be signed in to change notification settings - Fork 22
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
docs(js): nextjs-13 example #489
Conversation
|
||
## Learn More | ||
|
||
To learn more about Arize Phoenix, take a look at the following resources: |
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.
Missing the follow-up list.
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.
addressed in c9d0c2f
|
||
const provider = new NodeTracerProvider({ | ||
resource: new Resource({ | ||
["openinference.project.name"]: "nextjs-chat", |
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.
Suggestion: Use our semantic convention constant here rather than hard-coding.
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.
Yeah it's not in the conventions right now. #494
span.setAttributes({ | ||
[SemanticConventions.OPENINFERENCE_SPAN_KIND]: | ||
OpenInferenceSpanKind.CHAIN, | ||
[INPUT_VALUE]: question, |
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.
Missing mime types.
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.
it's text
}); | ||
const answer: string = chatCompletion.choices[0].message.content || ""; | ||
span.setAttributes({ | ||
[OUTPUT_VALUE]: answer, |
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.
Missing mime types.
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.
leaving it off for simplicity. The default mimetype is text so leaving it.
resolves #452
Note that I am only able to make this work using Nextjs 13. Otel doesn't seem to "stick" with nextjs 14 as the compilation of the server code strips the instrumentation (patches are removed).