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

(DRAFT) Example Point of Sales ES Rules #1967

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JimHagan
Copy link

Relevant information

This is currently build off Log data representing various events related to custom device types.

Included device types so far:

DT = Drive Through (device.type = 'DT')
KIOSK = Self Servce KIOSK (device.type = 'CSO') - will be KIOSK eventually
FC = Front Counter Device (device.type = 'FC')
POS = Point of Sale Device / Register (device.type = 'POS')
KVS = Kitchen Video System (device.type = 'KVS')
STORE = Store (this is not a device type -- it's an abstraction)

Checklist

  • I've read the guidelines and understand the acceptance criteria.
  • The value of the attribute marked as identifier will be unique and valid.
  • I've confirmed that my entity type wasn't already defined. If it is I'm providing an explanation above.

About the Source Data

The source data for this entity will come from Log. Each candidate will contain the necessary components as defined in the synthesis rule. This simple count query facets by all necessary elements:

FROM Log SELECT count(*) where device.type = 'CSO' facet country, store.number, device.type, device.number

USA,07001,CSO,22,1552
USA,00268,CSO,27,1449
USA,00268,CSO,33,1358
USA,07027,CSO,44,1353
USA,01551,CSO,77,1335
USA,07105,CSO,88,1317
USA,07071,CSO,99,1280
USA,07028,CSO,15,1252
USA,07010,CSO,12,1233
USA,07013,CSO,11,1217

The follwoing raw sample data can be used to validate the synthesis rules. This is a kiosk at "fake store" at the geographical center of the USA:

  {
            "@timestamp": "2025-02-01T13:11:03.360Z",
            "country": "USA",
            "device.number": "33",
            "device.type": "CSO",
            "geo.location.lat": "41.850033",
            "geo.location.lon": "0.066515",
            "host.ip": "192.0.2.1",
            "hostname": "USAS00001CSO33",
            "level": "ERROR",
            "message": "Unable to Process Payment",
            "newrelic.source": "api.logs",
            "store.number": "00001",
            "timestamp": 1738415463360
          }

Copy link
Collaborator

@entityBot entityBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beep boop bop.

I have found some errors processing these changes:

* Error PARSING domainType: 'ext-test_DT' on LinkedHashMap<String, entitydefinitionemitter.models.CustomSummaryMetricDefinition> - jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `entitydefinitionemitter.models.CustomSummaryMetricDefinition` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (StringReader); line: 2, column: 3] (through reference chain: LinkedHashMap["summary_metrics"])

* Error PARSING domainType: 'ext-test_DT' on LinkedHashMap<String, entitydefinitionemitter.models.CustomGoldenMetricDefinition> - jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class entitydefinitionemitter.models.CustomGoldenMetricDefinition] value failed for JSON property title due to missing (therefore NULL) value for creator parameter title which is a non-nullable type
at [Source: (StringReader); line: 7, column: 1] (through reference chain: LinkedHashMap["golden_metrics"]->entitydefinitionemitter.models.CustomGoldenMetricDefinition["title"])

* Error PARSING domainType: 'ext-test_FC' on LinkedHashMap<String, entitydefinitionemitter.models.CustomSummaryMetricDefinition> - jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `entitydefinitionemitter.models.CustomSummaryMetricDefinition` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (StringReader); line: 2, column: 3] (through reference chain: LinkedHashMap["summary_metrics"])

* Error PARSING domainType: 'ext-test_FC' on LinkedHashMap<String, entitydefinitionemitter.models.CustomGoldenMetricDefinition> - jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class entitydefinitionemitter.models.CustomGoldenMetricDefinition] value failed for JSON property title due to missing (therefore NULL) value for creator parameter title which is a non-nullable type
at [Source: (StringReader); line: 7, column: 1] (through reference chain: LinkedHashMap["golden_metrics"]->entitydefinitionemitter.models.CustomGoldenMetricDefinition["title"])

* Error PARSING domainType: 'ext-test_KIOSK' on LinkedHashMap<String, entitydefinitionemitter.models.CustomSummaryMetricDefinition> - jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `entitydefinitionemitter.models.CustomSummaryMetricDefinition` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (StringReader); line: 2, column: 3] (through reference chain: LinkedHashMap["summary_metrics"])

* Error PARSING domainType: 'ext-test_KIOSK' on LinkedHashMap<String, entitydefinitionemitter.models.CustomGoldenMetricDefinition> - jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class entitydefinitionemitter.models.CustomGoldenMetricDefinition] value failed for JSON property title due to missing (therefore NULL) value for creator parameter title which is a non-nullable type
at [Source: (StringReader); line: 17, column: 1] (through reference chain: LinkedHashMap["golden_metrics"]->entitydefinitionemitter.models.CustomGoldenMetricDefinition["title"])

* Error PARSING domainType: 'ext-test_KVS' on LinkedHashMap<String, entitydefinitionemitter.models.CustomSummaryMetricDefinition> - jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `entitydefinitionemitter.models.CustomSummaryMetricDefinition` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (StringReader); line: 2, column: 3] (through reference chain: LinkedHashMap["summary_metrics"])

* Error PARSING domainType: 'ext-test_KVS' on LinkedHashMap<String, entitydefinitionemitter.models.CustomGoldenMetricDefinition> - jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class entitydefinitionemitter.models.CustomGoldenMetricDefinition] value failed for JSON property title due to missing (therefore NULL) value for creator parameter title which is a non-nullable type
at [Source: (StringReader); line: 7, column: 1] (through reference chain: LinkedHashMap["golden_metrics"]->entitydefinitionemitter.models.CustomGoldenMetricDefinition["title"])

* Error PARSING domainType: 'ext-test_POS' on entitydefinitionemitter.models.BaseEntityDefinition - jackson.databind.exc.MismatchedInputException: Missing required creator property 'name' (index 0)
at [Source: (StringReader); line: 50, column: 1] (through reference chain: entitydefinitionemitter.models.BaseEntityDefinition["synthesis"]->entitydefinitionemitter.models.CustomEntitySynthesisRules["rules"]->ArrayList[0]->entitydefinitionsclientsynthesis.models.definitions.EntitySynthesisRule["name"])

* Error PARSING domainType: 'ext-test_STORE' on LinkedHashMap<String, entitydefinitionemitter.models.CustomSummaryMetricDefinition> - jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `entitydefinitionemitter.models.CustomSummaryMetricDefinition` from Array value (token `JsonToken.START_ARRAY`)
at [Source: (StringReader); line: 2, column: 3] (through reference chain: LinkedHashMap["summary_metrics"])

* Error PARSING domainType: 'ext-test_STORE' on LinkedHashMap<String, entitydefinitionemitter.models.CustomGoldenMetricDefinition> - jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class entitydefinitionemitter.models.CustomGoldenMetricDefinition] value failed for JSON property title due to missing (therefore NULL) value for creator parameter title which is a non-nullable type
at [Source: (StringReader); line: 27, column: 1] (through reference chain: LinkedHashMap["golden_metrics"]->entitydefinitionemitter.models.CustomGoldenMetricDefinition["title"])

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'country' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'host.ip' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'device.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'geo.location.lon' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'device.type' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'store.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KVS' on synthesis.tag.ttl for key 'geo.location.lat' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'country' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'host.ip' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'device.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'geo.location.lon' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'device.type' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'store.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-DT' on synthesis.tag.ttl for key 'geo.location.lat' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-STORE' on synthesis.tag.ttl for key 'country' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-STORE' on synthesis.tag.ttl for key 'store.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'country' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'host.ip' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'device.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'geo.location.lon' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'device.type' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'store.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-FC' on synthesis.tag.ttl for key 'geo.location.lat' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'country' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'host.ip' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'device.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'geo.location.lon' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'device.type' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'store.number' - format.DateTimeParseException: Text cannot be parsed to a Duration

* Error VALIDATING domainType: 'EXT-KIOSK' on synthesis.tag.ttl for key 'geo.location.lat' - format.DateTimeParseException: Text cannot be parsed to a Duration

@JimHagan JimHagan marked this pull request as draft March 19, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants