Comments (4)
Could we possibly reuse the instrumentation (we use for statsd) to add these logs?
jira-bugzilla-integration/jbi/services/common.py
Lines 37 to 44 in 26255e9
from jira-bugzilla-integration.
That's a good idea, and I thought the same thing 🙌🏻. Some thoughts there:
- We might want to log both client methods (via the decorator you linked, or maybe a new decorator) and service methods (the methods contained in this issue). Logging service methods would be good for when we bail out of a method, such as
delete_jira_issue_if_duplicate
:
jira_key_in_bugzilla = latest_bug.extract_from_see_also(
project_key=context.jira.project
)
_duplicate_creation_event = (
jira_key_in_bugzilla is not None and issue_key != jira_key_in_bugzilla
)
if not _duplicate_creation_event:
+ logger.debug("No Jira issue to delete")
return None
- I wish we "owned" the Jira client, I've tried to think of a few ways to inject our request ID into logging so that we can correlate requests, and it's ended up feeling a little invasive.
from jira-bugzilla-integration.
Upon quick glance--most of the service methods call the client methods; so we'd be logging as we make the service call internally, and then as we make the client call. Some of the service methods are minimally different than the client ones, but I can imagine there being value in a more in-depth breadcrumb trail for logging.
What if we followed a similar format that we did with the client logging: create a decorator and apply it to the service methods in question--possibly format with method_name: {method_name}; parameters: {parameters}; results: {results}
(not pushing for this as a solution--just a formulaic possibility)
...As I write this out--it depends on what we plan on using this information for and how it would be most useful for our team; if we wanted to be able to follow an error stack to determine where something went wrong? For audit trails (for a bug_id)?
//It might be worthwhile to have a context object that tracks the methods and results and submits it all to the logging agent when the processing finishes? //
(fin brain dribble 😵 )
from jira-bugzilla-integration.
It might be nice to have a visual as to where we're at with our current logging practices to understand where our largest "holes" are to cover.
And if our current logging is not at all where we want to be--then rethinking the entire logging strategy could be worth some time (but possibly something we do at a later time--not to take away from this card, as there is still value by increasing the transparency of what the service is doing).
from jira-bugzilla-integration.
Related Issues (20)
- `resolution` not set on creation
- Update docs around steps available HOT 2
- `Failed to parse events for bug XYZ`: offset-naive and offset-aware datetimes error
- Add more context fields to queue exception logs
- Add endpoint to introspect queue
- Unused methods in queue
- How to handle invalid webhook payloads?
- HTTPError entries in queue do not provide insighful details
- Webhook event lost when Bugzilla is down
- Queue dockerflow check error
- Synchronize past comments
- Pandoc does not render bullets points correctly in Jira
- Field value of `Fields.event.time` and `bug.creation_time` in logs are received as `datetime.datetime(2024, 4, 9, 15, 39, 56)` instead of ISO format HOT 3
- Logging with field `operation="ignore"` is confusing
- Adding a patch on Bugzilla creates a meaningless comment on Jira HOT 5
- JBI slash escaping some characters when sending summary field data into Jira
- Store request id in DL queue item
- retry job logger is called `__main__` instead of "retry"
- Sync Cloud Services::Operations: Autgraph with AUT HOT 1
- Conversion of truncated markdown to Jira can leed to error `exceeds the allowed limit of 32,767 characters.`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jira-bugzilla-integration.