-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
/schemas
is the top 404
#3468
Comments
Moving the discussion from #3469 (comment) - @tigrannajaryan writes:
Note that the path $ curl -sI https://opentelemetry.io/schemas/ | grep type content-type: text/html; charset=utf-8 Are you ok with that? What is being returned is the default 404 page. We might as well have the 404 page list the available schemas, so it would be more helpful to readers. Let's call this Option 404. There is another option, discussed next. As you might know, the server can return two different response types for any given path. That is, we can also setup the server to respond to
Would that serve your needs? Let's call this Option dual-response. |
It is a 404 and noone is going to rely on a 404 page having a particular content or format. If we make it return 200 I am worried people will make assumption about it (e.g. parse for the list of schemas). If it is a 404 we keep the option open to introduce a machine-readable format for it. Let me flip this: why is it a problem that it returns 404? |
The short answer is that it's not a problem to return a 404. What I gather from your question is that you'd be ok with the "Option 404" solution described above -- i.e., that the 404 page return the schema list? The longer answer is that 404s over a URL usually indicate that readers are looking for a specific information at that URL, but no content has been published. It seems reasonable to believe that users are visiting
That isn't true in my experience. Folks browsing with a web browser don't care (or often know) what status code is returned. In fact, some servers use this in creative ways. Anyhow, if you're comfortable with Option 404, I can move ahead and implement that. Have you given thought to the dual-response option? Any app wanting a machine readable file should request a particular data type: $ curl -H "Accept: application/json" https://opentelemetry.io/schemas/
... # JSON data response |
FYI, I've implemented the 404 option in #3469: $ curl -sI https://deploy-preview-3469--opentelemetry.netlify.app/schemas
HTTP/2 404 But this 404 page still shows a human-readable list of schemas via the same path: https://deploy-preview-3469--opentelemetry.netlify.app/schemas/. Is this acceptable to you? I still think that the dual-response solution would be better. Ok, let's sleep on it ;). |
@tigrannajaryan - what's wrong with using another path for the machine-readable schema list? Here are some ideas:
|
Since @chalin and I talked about this issue during the Comms SIG meeting yesterday, here a few thoughts from my site: There are 2 audiences we want to serve:
If I understand your (@tigrannajaryan) concern correctly, you worry about people relying on the format of that site (no matter if it is html or json or ...) and going to complain if we ever decide to break it. And since we (=OpenTelemetry Community) made this experience a few times already that people rely on things that are marked "experimental" and then still complain, you are reluctant to have something like that put in place. (And I also see people crawling an HTML page listing the versions and then still complaining that their code breaks when we decide to change the format). At the same time @chalin reported that I think that the proposal in PR #3469 is a good common ground, it gives people a list, but still reports a 404 to say "This is not a real thing yet". I think we should also include a verbal disclaimer letting people know that this page is not intended to be consumed automatically and may change in the future. |
Thanks for following up on our discussion with some comments here @svrnm. I felt inspired, after the Comms meeting, to further explore the separate list page solution. For an implementation, see: |
The proposal sounds OK to me, but please also bring it to the spec SIG meeting to make sure there are no objections. |
@tigrannajaryan - SIG semconv? (Since the schemas are not part of the semconv repo) Or actually SIG Spec? |
Would be nice to do both :-) |
Ok, I'll see to schedule that. In the meantime I'll add the SIGs as reviewers to solicit some initial feedback. |
@chalin let me know if you can not attend any of the meetings and I will check my schedule to help with that. |
What's the status of this one? |
it's complicated ;-) |
Clearly folks are interested in listing the available schemas, because
/schemas
(or/schemas/
) is the #1 legitimate 404. I think that there should be a schemas index page, and will submit a proposal soon.@tigrannajaryan had already argued against an index page, see #1144 (comment). I'd like to open this up for discussion and see if we can find a win-win solution.
Proposed alternative solutions:
/schemas
in YAML,/schemas/list
in HTML, and a 404 page for the rest #3537Schemas: add/schemas/list
page, and custom 404 for/schemas
and missing subpages #3508List available schemas in 404 response to/schemas
#3469Related:
/schemas
URL in the telemetry schema portion of the specification. opentelemetry-specification#3762/cc @open-telemetry/specs-semconv-maintainers @jsuereth @svrnm @MrAlias
The text was updated successfully, but these errors were encountered: