OpenTelemetry log export
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 696
- Avg merge
- 7d 19h
- Merged PRs (30d)
- 2
Description
I'd love to have exportable logs + general niceties related to logging. Making this issue so I can track my work. Do not contribute to this, I am working on this.
# cog.yaml
observability:
logs: true
# predict.py
import logging
def predict() -> str:
print("starting prediction")
logging.info("preprocessing complete")
return "result"
Both print() and logging show up in the collector carrying prediction context:
body: "starting prediction"
attributes: { source: stdout, operation: predict, cog.prediction.id: "..." }
body: "preprocessing complete"
attributes: { source: logging, operation: predict, cog.prediction.id: "..." }
Customization stays optional through telemetry.py:
# telemetry.py
from opentelemetry.sdk._logs import LoggerProvider
from opentelemetry.sdk.resources import Resource
def create_logger_provider(resource: Resource) -> LoggerProvider:
...
// coglet runtime events export to the same OpenTelemetry destination.
tracing::info!("prediction accepted");
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The proposal references cog.yaml, predict.py, telemetry.py, and coglet runtime events. Start by reviewing the existing observability and logging entry points, then compare their behavior with the shown collector output. Done means the requested stdout, Python logging, and runtime event export behavior is supported with optional LoggerProvider customization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100