sonatype-lift[bot] commented on code in PR #311:
URL: https://github.com/apache/skywalking-python/pull/311#discussion_r1214067341
##########
skywalking/log/sw_logging.py:
##########
@@ -83,7 +83,7 @@ def build_log_tags() -> LogTags:
# exceptions before any span is even created, just ignore these
fields and
# avoid appending 'no active span' traceback that could be
confusing.
# Or simply the log is generated outside any span context.
- active_span_id = context.active_span.sid
+ active_span_id = context.peek(raise_if_none=True).sid
Review Comment:
<picture><img alt="5% of developers fix this issue"
src="https://lift.sonatype.com/api/commentimage/fixrate/5/display.svg"></picture>
<b>*reportOptionalMemberAccess:</b>* "sid" is not a known member of "None"
---
<details><summary>ℹ️ Expand to see all <b>@sonatype-lift</b>
commands</summary>
You can reply with the following commands. For example, reply with
***@sonatype-lift ignoreall*** to leave out all findings.
| **Command** | **Usage** |
| ------------- | ------------- |
| `@sonatype-lift ignore` | Leave out the above finding from this PR |
| `@sonatype-lift ignoreall` | Leave out all the existing findings from this
PR |
| `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
**Note:** When talking to LiftBot, you need to **refresh** the page to see
its response.
<sub>[Click here](https://github.com/apps/sonatype-lift/installations/new)
to add LiftBot to another repo.</sub></details>
##########
skywalking/plugins/sw_loguru.py:
##########
@@ -79,7 +79,7 @@ def _sw_sink(message):
# exceptions before any span is even created, just ignore these
fields and
# avoid appending 'no active span' traceback that could be
confusing.
# Or simply the log is generated outside any span context.
- active_span_id = context.active_span.sid
+ active_span_id = context.peek(raise_if_none=True).sid
Review Comment:
<picture><img alt="5% of developers fix this issue"
src="https://lift.sonatype.com/api/commentimage/fixrate/5/display.svg"></picture>
<b>*reportOptionalMemberAccess:</b>* "sid" is not a known member of "None"
---
<details><summary>ℹ️ Expand to see all <b>@sonatype-lift</b>
commands</summary>
You can reply with the following commands. For example, reply with
***@sonatype-lift ignoreall*** to leave out all findings.
| **Command** | **Usage** |
| ------------- | ------------- |
| `@sonatype-lift ignore` | Leave out the above finding from this PR |
| `@sonatype-lift ignoreall` | Leave out all the existing findings from this
PR |
| `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified
`file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
**Note:** When talking to LiftBot, you need to **refresh** the page to see
its response.
<sub>[Click here](https://github.com/apps/sonatype-lift/installations/new)
to add LiftBot to another repo.</sub></details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]