Skip to content
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

[instrumentation] convenience methods for chain spans #1149

Open
Tracked by #1148
axiomofjoy opened this issue Dec 5, 2024 · 1 comment · May be fixed by #1147
Open
Tracked by #1148

[instrumentation] convenience methods for chain spans #1149

axiomofjoy opened this issue Dec 5, 2024 · 1 comment · May be fixed by #1147
Assignees

Comments

@axiomofjoy
Copy link
Contributor

No description provided.

@github-project-automation github-project-automation bot moved this to 📘 Todo in phoenix Dec 5, 2024
@axiomofjoy axiomofjoy linked a pull request Dec 5, 2024 that will close this issue
@axiomofjoy axiomofjoy self-assigned this Dec 5, 2024
@mikeldking
Copy link
Contributor

mikeldking commented Dec 10, 2024

Spit balling here:

from openinference.instrumentation import agent, chain, trace


@agent(name="calculator-agent")
def agent(): 
   ....


@chain
def apply_parameters():
   ....

In addition I may want to imparatively create a span inside of a function body:

tracer = tracer_provider.get_tracer(__name__)

def some_llm_function(input):
   with tracer.start_as_current_span(
       name="name",
       kind="chain",
       attributes={},
   ) as span:
       # do work
       span.set_input(output)
       span.set_output(output)

@mikeldking mikeldking moved this from 📘 Todo to 👨‍💻 In progress in phoenix Dec 11, 2024
@mikeldking mikeldking moved this from 👨‍💻 In progress to 📘 Todo in phoenix Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📘 Todo
Development

Successfully merging a pull request may close this issue.

2 participants