pcdshub / pcdshub/pcdsutils

Logging - fix 'timestamp' field

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
6
Avg merge
7d 11h
Merged PRs (30d)
1

Description

Looks like 'created' isn't in some log messages, meaning the field 'ts' never gets populated:
https://github.com/pcdshub/pcdsutils/blob/8d44a355311ec221e97fa9f1c00df59ca2085409/pcdsutils/log.py#L52-L53

With the new pipeline config, logstash will add in the field regardless

To fix:

  • ts should be renamed to timestamp
  • Debug as to why created isn't there in the first place

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pcdsutils/log.py at lines 52-53, where the log fields are assembled. Investigate why created is absent from some messages, rename ts to timestamp, and verify that the timestamp field is populated consistently without relying on the new Logstash pipeline configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.