openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

🚀 Feature: support emitting events for prompts in addition to current behavior

Open nirga opened this issue 10 months ago • 19 comments

Which component is this feature for?

All Packages

🔖 Feature description

Fix the following packages and their tests:

  • [ ] AlephAlpha
  • [ ] Anthropic
  • [ ] Bedrock
  • [ ] Cohere
  • [ ] Google Generative AI
  • [ ] Groq
  • [ ] Langchain
  • [ ] LlamaIndex
  • [ ] Mistral AI
  • [ ] Ollama
  • [ ] OpenAI
  • [ ] Replicate
  • [ ] SageMaker
  • [ ] Together
  • [ ] Transformers
  • [ ] VertexAI
  • [ ] WatsonX

🎤 Why is this feature needed ?

Full compliance with new semantic conventions

✌️ How do you aim to achieve this?

See new OpenAI instrumentation for inspiration.

  • [ ] Make sure to keep the current way of emitting events and the new (event-based) way with the official semantic conventions.
  • [ ] Add a config to each instrumentation called use_legacy_attributes which defaults to true, and if set to false emit events instead of the prompt / completion attributes.
  • [ ] Propagate a new initialization parameter of the SDK called use_legacy_attributes that sets this config in all instrumentations.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

Are you willing to submit PR?

None

nirga avatar Jan 02 '25 15:01 nirga