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

GenAI: server.port is usually 443 but we require setting it on every span #1828

Open
aabmass opened this issue Jan 27, 2025 · 2 comments
Open
Labels
area:gen-ai bug Something isn't working

Comments

@aabmass
Copy link
Member

aabmass commented Jan 27, 2025

Area(s)

area:gen-ai

What's missing?

Original thread for context: open-telemetry/opentelemetry-python-contrib#3208 (comment)

Right now, the general conventions require a server.port if server.address is present

| [`server.port`](/docs/attributes-registry/server.md) | int | GenAI server port. [5] | `80`; `8080`; `443` | `Conditionally Required` If `server.address` is set. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

In most cases it's 443 so this introduces some overhead. Individual GenAI systems like Azure or Vertex AI may have a different default.

Describe the solution you'd like

Azure has a specific convention for this which allows eliding server.port:

Conditionally Required If not default (443)

However that conflicts with the general GenAI span conventions which require it. We should consider

  1. Loosening the GenAI server.port convention by adding a note there that system-specific conventions can provide a default value
  2. Specify a default server.port of 443 for all systems and not add system-specific conventions. This would cover most standard HTTPS communication and be a bit simpler.
@aabmass
Copy link
Member Author

aabmass commented Jan 27, 2025

I personally think I prefer keeping it required and not having system-specific overrides because it makes things hard for consumers. We are encoding a lot of knowledge out of band in the semantic conventions instead of in band with the telemetry.

If not that, I think a "global" default of 443 for GenAI spans is reasonable and easier for consumers to handle vs switching on gen_ai.system.

@lmolkova
Copy link
Contributor

If not that, I think a "global" default of 443 for GenAI spans is reasonable and easier for consumers to handle vs switching on gen_ai.system.

I'd support it. I'd still expect that specific systems could override it (e.g. self-hosted system don't have a default) or some non-http based API may have a different default.

I don't think knowing the port is absolutely essential in GenAI domain (you can usually enable underlying HTTP spans if you need extra details) and having it set to 443 on almost everything externally hosted looks wasteful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:gen-ai bug Something isn't working
Development

No branches or pull requests

2 participants