Slackbot
03/14/2023, 4:54 PMnitya-signoz
03/14/2023, 5:05 PMLuke Hsiao
03/14/2023, 5:07 PMnitya-signoz
03/14/2023, 5:11 PMnitya-signoz
03/14/2023, 5:12 PMLuke Hsiao
03/14/2023, 5:12 PMLuke Hsiao
03/14/2023, 11:51 PMspan_idSpanIdspan_idLuke Hsiao
03/15/2023, 12:01 AMseverityTextSeverityTextnitya-signoz
03/15/2023, 3:38 AMTravis Chambers
03/16/2023, 9:31 PMThe receivers FluentForward and OTLP doesn’t have operators. But for parsing them we can use logprocessor. i would have expected this to work:
processors:
      logstransform:
        operators:
          - type: json_parser
            id: my_new_body
            parse_from: attributes.bodysignoz-otel-collector 2023-03-16T21:26:55.811Z    info    pipelines/pipelines.go:90    Processor is starting...    {"kind": "processor", "name": "logstransform", "pipeline": "logs"}                             │
│ signoz-otel-collector 2023-03-16T21:26:55.811Z    info    pipelines/pipelines.go:94    Processor started.    {"kind": "processor", "name": "logstransform", "pipeline": "logs"}body│ signoz-otel-collector 2023-03-16T21:29:03.909Z    error    helper/transformer.go:110    Failed to process entry    {"kind": "processor", "name": "logstransform", "pipeline": "logs", "operator_id": "my_new_body ││ ", "operator_type": "json_parser", "error": {"description": "Entry is missing the expected parse_from field.", "suggestion": "Ensure that all incoming entries contain the parse_from field." ...nitya-signoz
03/17/2023, 4:08 AMnitya-signoz
03/17/2023, 4:12 AMattributes.bodyattributesparse_toifbodyTravis Chambers
03/17/2023, 8:38 PMfilelog/k8sattributes{
  "timestamp": 1679085202378150700,
  "id": "2N9hfxnx4K6pMEslQ4UBGZL0EWB",
  "trace_id": "",
  "span_id": "",
  "trace_flags": 0,
  "severity_text": "",
  "severity_number": 0,
  "body": "{\"body\": {\"http\": {\"method\": \"GET\", \"request_id\": \"5514ff9e43d94cbca171a6751ccae7ca\", \"version\": \"1.1\", \"user_agent\": \"kube-probe/1.24+\"}, \"network\": {\"client\": {\"ip\": \"10.0.3.226\", \"port\": 33064}}, \"duration\": 427268, \"request_id\": \"5514ff9e43d94cbca171a6751ccae7ca\", \"logger\": \"api.access\", \"filename\": \"main.py\", \"func_name\": \"logging_middleware\", \"lineno\": 74, \"message\": \"10.0.3.226:33064 - \\\"GET /api/v1/healthz HTTP/1.1\\\" 200\"}, \"severityText\": \"info\", \"timestamp\": \"2023-03-17T20:33:22.377798Z\", \"traceId\": \"5514ff9e43d94cbca171a6751ccae7ca\"}",
  "resources_string": {
    "host_name": "<hostname>",
    "k8s_cluster_name": "",
    "k8s_container_name": "mlcore-web",
    "k8s_container_restart_count": "0",
    "k8s_namespace_name": "mlcore",
    "k8s_node_name": "<nodename>",
    "k8s_pod_ip": "<k8s_pod_ip>",
    "k8s_pod_name": "mlcore-web-6876b7c7b9-2cxxx",
    "k8s_pod_start_time": "2023-03-17 13:55:03 +0000 UTC",
    "k8s_pod_uid": "caad5d5e-7a16-471d-8a5f-0459b5aa90c4",
    "os_type": "linux",
    "signoz_component": "otel-agent"
  },
  "attributes_string": {
    "log_file_path": "/var/log/pods/mlcore_mlcore-web-6876b7c7b9-2cxxx_7144c554-5d97-4774-ae17-6c39ef19a518/mlcore-web/0.log",
    "log_iostream": "stderr",
    "logtag": "F",
    "time": "2023-03-17T20:33:22.378150623Z"
  },
  "attributes_int": {},
  "attributes_float": {}
}receivers:
      filelog/k8s:
        include:
          - /var/log/pods/*/*/*.log
        exclude:
          - /var/log/pods/kube-system_*/*/*.log
        operators:
          - type: json_parser
            id: body_parser
            parse_from: attributes.body
            parse_to: attributes.parsed_bodypipelines:
        logs:
          receivers: [otlp, filelog/k8s]attributes.bodybodybody.bodyparse_toTravis Chambers
03/17/2023, 9:21 PMreceivers:
      filelog/k8s:
        include:
          - /var/log/pods/*/*/*.log
        exclude:
          - /var/log/pods/kube-system_*/*/*.log
        operators:
          - type: add
            field: travis_key
            value: travis_valError: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:* error decoding 'receivers': error reading receivers configuration for "filelog/k8s": 1 error(s) decoding:* error decoding 'operators[0]': unmarshal to add: 1 error(s) decoding:* error decoding 'field': unrecognized prefix
2023/03/17 21:17:03 application run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:* error decoding 'receivers': error reading receivers configuration for "filelog/k8s": 1 error(s) decoding:* error decoding 'operators[0]': unmarshal to add: 1 error(s) decoding:* error decoding 'field': unrecognized prefixTravis Chambers
03/18/2023, 12:41 AMotel-agent-config.yamlotel-collector-config.yamlTravis Chambers
03/18/2023, 12:43 AMTravis Chambers
03/18/2023, 12:56 AMmovebodyjson_parser"body": "{\"filename\":\"main.py\",\"func_name\":\"logging_middleware\",\"http\":{\"method\":\"GET\",\"request_id\":\"TfHgVf2bYLlyDRSQT6YD8\",\"status_code\":200,\"url\":\"<http://api.dev.nsinfra.dev/api/v1/accounts/iyvnjbnodqsfcfiwegflr/projects/3720/tasks/e2b98ed9-ba95-41bf-be6a-216df7ab57c9>\",\"user_agent\":\"node-fetch\",\"version\":\"1.1\"},\"lineno\":74,\"logger\":\"api.access\",\"message\":\"10.0.2.174:40388 - \\\"GET /api/v1/accounts/iyvnjbnodqsfcfiwegflr/projects/3720/tasks/e2b98ed9-ba95-41bf-be6a-216df7ab57c9 HTTP/1.1\\\" 200\",\"network\":{\"client\":{\"ip\":\"10.0.2.174\",\"port\":40388}},\"request_id\":\"TfHgVf2bYLlyDRSQT6YD8\"}",- from: attributes.body.duration
          to: attributes.duration
          type: movebody.duration GTE <some_value>