elastic / observability-docs

Elastic Observability Documentation
Other
33 stars 151 forks source link

Create Monitoring Azure OpenAI docs #3963

Closed mdbirnstiehl closed 2 weeks ago

mdbirnstiehl commented 4 weeks ago

This PR closes #3961.

Creates a tutorial for the Azure OpenAI integration, and should include the following sections:

Example application for Azure OpenAI APM monitoring with OTel is here

github-actions[bot] commented 4 weeks ago

A documentation preview will be available soon.

Request a new doc build by commenting * Rebuild this PR: `run docs-build` * Rebuild this PR and all Elastic docs: `run docs-build rebuild` `run docs-build` is much faster than `run docs-build rebuild`. A `rebuild` should only be needed in rare situations. If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status [here](https://buildkite.com/elastic/docs-build).
mdbirnstiehl commented 3 weeks ago

@vinaychandrasekhar I had some issues getting the OTel/APM guide working, but I think it might be worthwhile getting this guide out with the integration info since it has gone to GA, then finishing the APM part in a separate PR. WDYT?

@muthu-mps would you be able to provide a technical review here or do you know someone who could?

vinaychandrasekhar commented 3 weeks ago

@sorenlouv - would appreciate your help with reviewing / correcting the OTel/APM guide for @mdbirnstiehl . Thanks!

mdbirnstiehl commented 3 weeks ago

@sorenlouv - would appreciate your help with reviewing / correcting the OTel/APM guide for @mdbirnstiehl . Thanks!

I added a rough draft of the APM/Otel guide that is inline with the blog I was meant to reproduce in the docs.

Here's the error I've been getting, as mentioned in slack:

Traceback (most recent call last):
  File "counter.py", line 3, in <module>
    import monitor  # Import the module
  File "/home/mbirnstiehl/workspace/ChatGPTMonitoringWithOtel/monitor.py", line 55, in <module>
    openai.Completion.create = count_completion_requests_and_tokens(openai.Completion.create)
  File "/home/mbirnstiehl/workspace/ChatGPTMonitoringWithOtel/monitor.py", line 31, in count_completion_requests_and_tokens
    def wrapper(*args, **kwargs):
  File "/usr/lib/python3.8/functools.py", line 55, in update_wrapper
    setattr(wrapper, attr, value)
TypeError: __name__ must be set to a string object

Which seems to be related to this code in the monitor.py code in the example app from the blog:

openai.Completion.create = count_completion_requests_and_tokens(openai.Completion.create)

I'm not exactly sure where the error is occurring. I'm guessing it has something to do with differences between Azure OpenAI and OpenAI, but I'm not sure what the differences are between the APIs, so I could use some guidance here. Thank you!

muthu-mps commented 3 weeks ago

I have tried to put it in the view mode. I am observing some text is bold and some are not within the same context. Also the data view appears as logs- instead of logs-*. I see the text in the document is appropriate and the view is inappropriate. Please verify this in the view mode and make sure it appears correctly.

docs
muthu-mps commented 3 weeks ago

While looking into the document we are jumping from STEP: 2 to STEP: 4. You need to update the numbering for STEPS.

mdbirnstiehl commented 3 weeks ago

I have tried to put it in the view mode. I am observing some text is bold and some are not within the same context. Also the data view appears as logs- instead of logs-*. I see the text in the document is appropriate and the view is inappropriate. Please verify this in the view mode and make sure it appears correctly.

@muthu-mps, thanks for the review so far! You can get a better view if you click on the HTML diff link in the github actions comment:

image

and select the page you want from there:

image

And it looks like it's formatting correctly there.

image