You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/11/10 01:46:57 UTC

[GitHub] [skywalking-php] heyanlong commented on a diff in pull request #29: Add plugin for phpredis.

heyanlong commented on code in PR #29:
URL: https://github.com/apache/skywalking-php/pull/29#discussion_r1014974746


##########
tests/data/expected_context.yaml:
##########
@@ -681,6 +681,139 @@ segmentItems:
               - { key: url, value: /memcached.php }
               - { key: http.method, value: GET }
               - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - {
+              operationName: Redis->connect,
+              parentSpanId: 0,
+              spanId: 1,
+              spanLayer: Http,

Review Comment:
   ```suggestion
                 spanLayer: Cache,
   ```



##########
tests/data/expected_context.yaml:
##########
@@ -681,6 +681,139 @@ segmentItems:
               - { key: url, value: /memcached.php }
               - { key: http.method, value: GET }
               - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - {
+              operationName: Redis->connect,
+              parentSpanId: 0,
+              spanId: 1,
+              spanLayer: Http,
+              startTime: gt 0,
+              endTime: gt 0,
+              componentId: 11000,
+              isError: false,
+              spanType: Exit,
+              peer: "127.0.0.1:6379",
+              skipAnalysis: false,
+            }
+          - operationName: Redis->mset
+            parentSpanId: 0
+            spanId: 2
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["mset",{"key0":"value0","key1":"value1"}]
+          - operationName: Redis->get
+            parentSpanId: 0
+            spanId: 3
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["get","key0"]
+          - operationName: Redis->get
+            parentSpanId: 0
+            spanId: 4
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["get","key1"]
+          - operationName: GET:/redis.succ.php
+            parentSpanId: -1
+            spanId: 0
+            spanLayer: Http
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 8001
+            isError: false
+            spanType: Entry
+            peer: ""
+            skipAnalysis: false
+            tags:
+              - { key: url, value: /redis.succ.php }
+              - { key: http.method, value: GET }
+              - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - operationName: Redis->connect
+            parentSpanId: 0
+            spanId: 1
+            spanLayer: Http
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 11000

Review Comment:
   ```suggestion
               componentId: 7
   ```



##########
tests/data/expected_context.yaml:
##########
@@ -681,6 +681,139 @@ segmentItems:
               - { key: url, value: /memcached.php }
               - { key: http.method, value: GET }
               - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - {
+              operationName: Redis->connect,
+              parentSpanId: 0,
+              spanId: 1,
+              spanLayer: Http,
+              startTime: gt 0,
+              endTime: gt 0,
+              componentId: 11000,

Review Comment:
   ```suggestion
                 componentId: 7,
   ```



##########
tests/data/expected_context.yaml:
##########
@@ -681,6 +681,139 @@ segmentItems:
               - { key: url, value: /memcached.php }
               - { key: http.method, value: GET }
               - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - {
+              operationName: Redis->connect,
+              parentSpanId: 0,
+              spanId: 1,
+              spanLayer: Http,
+              startTime: gt 0,
+              endTime: gt 0,
+              componentId: 11000,
+              isError: false,
+              spanType: Exit,
+              peer: "127.0.0.1:6379",
+              skipAnalysis: false,
+            }
+          - operationName: Redis->mset
+            parentSpanId: 0
+            spanId: 2
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["mset",{"key0":"value0","key1":"value1"}]
+          - operationName: Redis->get
+            parentSpanId: 0
+            spanId: 3
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["get","key0"]

Review Comment:
   Why not one line?
   e.g.
   ```shell
   get key0
   ```



##########
tests/data/expected_context.yaml:
##########
@@ -681,6 +681,139 @@ segmentItems:
               - { key: url, value: /memcached.php }
               - { key: http.method, value: GET }
               - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - {
+              operationName: Redis->connect,
+              parentSpanId: 0,
+              spanId: 1,
+              spanLayer: Http,
+              startTime: gt 0,
+              endTime: gt 0,
+              componentId: 11000,
+              isError: false,
+              spanType: Exit,
+              peer: "127.0.0.1:6379",
+              skipAnalysis: false,
+            }
+          - operationName: Redis->mset
+            parentSpanId: 0
+            spanId: 2
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["mset",{"key0":"value0","key1":"value1"}]
+          - operationName: Redis->get
+            parentSpanId: 0
+            spanId: 3
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["get","key0"]
+          - operationName: Redis->get
+            parentSpanId: 0
+            spanId: 4
+            spanLayer: Cache
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 7
+            isError: false
+            spanType: Exit
+            peer: 127.0.0.1:6379
+            skipAnalysis: false
+            tags:
+              - key: db.type
+                value: redis
+              - key: redis.command
+                value: |
+                  ["get","key1"]
+          - operationName: GET:/redis.succ.php
+            parentSpanId: -1
+            spanId: 0
+            spanLayer: Http
+            startTime: gt 0
+            endTime: gt 0
+            componentId: 8001
+            isError: false
+            spanType: Entry
+            peer: ""
+            skipAnalysis: false
+            tags:
+              - { key: url, value: /redis.succ.php }
+              - { key: http.method, value: GET }
+              - { key: http.status_code, value: "200" }
+      - segmentId: "not null"
+        spans:
+          - operationName: Redis->connect
+            parentSpanId: 0
+            spanId: 1
+            spanLayer: Http

Review Comment:
   ```suggestion
               spanLayer: Cache
   ```



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org