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

LogName should be more useful in the collector exporter. #716

Open
dashpole opened this issue Aug 24, 2023 · 1 comment
Open

LogName should be more useful in the collector exporter. #716

dashpole opened this issue Aug 24, 2023 · 1 comment
Labels
enhancement New feature or request priority: p2

Comments

@dashpole
Copy link
Contributor

Ideally, if a user sets service.name, we should use that. Maybe fall back to faas.name. All logs being written to a single log name is suboptimal.

cc @jsuereth

@dashpole dashpole added enhancement New feature or request priority: p2 labels Aug 24, 2023
@aabmass
Copy link
Contributor

aabmass commented Jul 15, 2024

I think what we decided to implement is:

  • If gcp.log_name attribute exists
    • If its value matches an Origin rule, e.g. /projects/{project_name}/logs/{log_name} use it exactly. log_name must be url-encoded.
    • Otherwise use its url-encoded value in a synthesized url, e.g. /projects/{default_project_id}/logs/{url_encoded_log_name}. The URL is chosen by selecting an owner using the Origin lookup rules.
    • In both cases, the full log name string must be less than 512 characters, or fallback
  • If service.name attribute exists (and gcp.log_name does not), this will be used as a log name:
    /{origin URL}/logs/{service.name}
  • Otherwise this will be /{origin URL}/logs/otelcollector or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: p2
Projects
None yet
Development

No branches or pull requests

2 participants