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

Expose LogEntry.operation #1676

Closed
tseaver opened this issue Mar 30, 2016 · 6 comments
Closed

Expose LogEntry.operation #1676

tseaver opened this issue Mar 30, 2016 · 6 comments
Assignees
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.

Comments

@tseaver
Copy link
Contributor

tseaver commented Mar 30, 2016

Remaining feature from #1566.

Open question: should the operation field be just-another-metadata-field (like severity, http_request), or should we expose it via some convenience wrapper (e.g., as an optional field on Batch, or some other context manager)?

@tseaver tseaver added type: question Request for information or clarification. Not an issue. api: logging Issues related to the Cloud Logging API. labels Mar 30, 2016
@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

Do you plan on implementing an Operation class?

@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

Dunno. An operation is conceptually a Additional information about a potentially long-running operation with which a log entry is associated.. On the entry, the operation is identified by a producer ID and a unique ID for the operation, along with flags signalling whether it is the first or last entry in the operation. I don't know what happens if entries tied to the same operation are delivered out-of-order.

If we wanted to expose it as a wrapper around Batch, we could derive Operation from Batch, and have it inject the correct values onto each entry as it added them to its request. I don't have a sense how useful this would be for applications which wanted to use the feature: maybe they would not want to be tied to entries delivered via a single API request? To support that case, we would need to plumb the operation paramter through to the log_text/log_struct/log_proto methods of Logger and Batch, and expect the user to pass a mapping (like http_request) which had the correct fields.

Hmm, maybe we should add a helper for http_request (and operation) to assist the user in constructing those mappings?

@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

It doesn't seem like it should derive from Batch. This actually reminds of the generic long-running operation used in Bigtable

@tseaver
Copy link
Contributor Author

tseaver commented Mar 30, 2016

I think the two are unrelated: in Bigtable, the operation is defined by the API. For logging, the operation is defined (optionally) by the entries.write caller (often GAE or some other service).

@dhermes
Copy link
Contributor

dhermes commented Mar 30, 2016

Ahh gotcha.

@lukesneeringer lukesneeringer added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Apr 19, 2017
@lukesneeringer
Copy link
Contributor

Hello,
One of the challenges of maintaining a large open source project is that sometimes, you can bite off more than you can chew. As the lead maintainer of google-cloud-python, I can definitely say that I have let the issues here pile up.

As part of trying to get things under control (as well as to empower us to provide better customer service in the future), I am declaring a "bankruptcy" of sorts on many of the old issues, especially those likely to have been addressed or made obsolete by more recent updates.

My goal is to close stale issues whose relevance or solution is no longer immediately evident, and which appear to be of lower importance. I believe in good faith that this is one of those issues, but I am scanning quickly and may occasionally be wrong. If this is an issue of high importance, please comment here and we will reconsider. If this is an issue whose solution is trivial, please consider providing a pull request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants