Git Product home page Git Product logo

Comments (8)

ocervell avatar ocervell commented on May 5, 2024

I'd like to look at your structure of the slo/ folder: do you have subfolders in there which could explain this ?

from slo-generator.

eraac avatar eraac commented on May 5, 2024

No subdirectories, 3 files (nearly the same but name and query are slightly different)

slo/entrypoint-ingestion-availability-asia.yaml
slo/entrypoint-ingestion-availability-europe.yaml
slo/entrypoint-ingestion-availability-us.yaml

from slo-generator.

ocervell avatar ocervell commented on May 5, 2024

So you correctly load and compute SLO report for those 3 SLOs, but it exports only one of them ? Could you please paste the run logs here ?

from slo-generator.

eraac avatar eraac commented on May 5, 2024

I've run slo-generator with the same configuration as before, and get a weird behavior

When I look at the dataset from the console via the preview tab I see all the record, but when I run SELECT * <dataset>.<table> I got only one record, I guess I've an issue with BigQuery not slo-generator, I'll open a case

But here the log if you want https://gist.github.com/Eraac/864f55ae9bdd0d7dd22ae3f75ca3aee5

from slo-generator.

eraac avatar eraac commented on May 5, 2024

@ocervell I've found the issue and bigquery is out of cause

slo-generator generate the same rows_ids for my case, which means BigQuery while de-deduplicate them

row_ids = row_ids_fmt.format(**data)

from slo-generator.

ocervell avatar ocervell commented on May 5, 2024

I'm not sure how BigQuery would de-duplicate them, since one of the metadata field is different.

From your logs, I see 4 export messages:

1st:

slo_generator.exporters.bigquery - DEBUG - Writing data to BigQuery:
{'metadata': [{'key': 'scope', 'value': 'internal'}, {'key': 'source', 'value': 'load-balancer'}, {'key': 'location', 'value': 'asia-east2'}, {'key': 'provider', 'value': 'gcp'}], 'slo_name': 'availability', 'service_name': '<redacted>', 'feature_name': 'ingestion', 'slo_description': '99.9% of <redacted> (ASIA) requests return a good HTTP code (2xx, 3xx, 4xx)', 'slo_target': 0.999, 'sli_measurement': 0.999995, 'bad_events_count': 30, 'good_events_count': 6034032, 'gap': 0.0009949999999999681, 'error_budget_policy_step_name': 'default', 'error_budget_target': 0.0010000000000000009, 'error_budget_measurement': 5.000000000032756e-06, 'error_budget_burn_rate': 0.0, 'error_budget_minutes': 0.06000000000000005, 'error_budget_remaining_minutes': 0.05969999999999809, 'error_minutes': 0.00030000000000196536, 'timestamp': 1642600222, 'timestamp_human': '2022-01-19T13:50:22.501392+00:00', 'window': 3600, 'alert': False, 'consequence_message': 'msg-ok'}
urllib3.connectionpool - DEBUG - https://bigquery.googleapis.com:443 "POST /bigquery/v2/projects/<redacted>/datasets/slo_generator/tables/report-staging/insertAll?prettyPrint=false HTTP/1.1" 200 None

2nd:

slo_generator.exporters.bigquery - DEBUG - Writing data to BigQuery:
{'metadata': [{'key': 'scope', 'value': 'internal'}, {'key': 'source', 'value': 'load-balancer'}, {'key': 'location', 'value': 'europe-west1'}, {'key': 'provider', 'value': 'gcp'}], 'slo_name': 'availability', 'service_name': '<redacted>', 'feature_name': 'ingestion', 'slo_description': '99.9% of <redacted> (EU) requests return a good HTTP code (2xx, 3xx, 4xx)', 'slo_target': 0.999, 'sli_measurement': 0.99997, 'bad_events_count': 815, 'good_events_count': 26911313, 'gap': 0.0009700000000000264, 'error_budget_policy_step_name': 'default', 'error_budget_target': 0.0010000000000000009, 'error_budget_measurement': 2.999999999997449e-05, 'error_budget_burn_rate': 0.0, 'error_budget_minutes': 0.06000000000000005, 'error_budget_remaining_minutes': 0.058200000000001584, 'error_minutes': 0.0017999999999984695, 'timestamp': 1642600222, 'timestamp_human': '2022-01-19T13:50:22.501392+00:00', 'window': 3600, 'alert': False, 'consequence_message': 'msg-ok'}
urllib3.connectionpool - DEBUG - https://bigquery.googleapis.com:443 "POST /bigquery/v2/projects/<redacted>/datasets/slo_generator/tables/report-staging/insertAll?prettyPrint=false HTTP/1.1" 200 None

3rd:

slo_generator.exporters.bigquery - DEBUG - Writing data to BigQuery:
{'metadata': [{'key': 'scope', 'value': 'internal'}, {'key': 'source', 'value': 'load-balancer'}, {'key': 'location', 'value': 'global'}, {'key': 'provider', 'value': 'gcp'}], 'slo_name': 'availability', 'service_name': '<redacted>', 'feature_name': 'ingestion', 'slo_description': '99.9% of <redacted> requests return a good HTTP code (2xx, 3xx, 4xx)', 'slo_target': 0.999, 'sli_measurement': 0.999977, 'bad_events_count': 845, 'good_events_count': 36512613, 'gap': 0.0009770000000000056, 'error_budget_policy_step_name': 'default', 'error_budget_target': 0.0010000000000000009, 'error_budget_measurement': 2.2999999999995246e-05, 'error_budget_burn_rate': 0.0, 'error_budget_minutes': 0.06000000000000005, 'error_budget_remaining_minutes': 0.05862000000000034, 'error_minutes': 0.0013799999999997148, 'timestamp': 1642600222, 'timestamp_human': '2022-01-19T13:50:22.501392+00:00', 'window': 3600, 'alert': False, 'consequence_message': 'msg-ok'}

4th:

slo_generator.exporters.bigquery - DEBUG - Writing data to BigQuery:
{'metadata': [{'key': 'scope', 'value': 'internal'}, {'key': 'source', 'value': 'load-balancer'}, {'key': 'location', 'value': 'us-central1'}, {'key': 'provider', 'value': 'gcp'}], 'slo_name': 'availability', 'service_name': '<redacted>', 'feature_name': 'ingestion', 'slo_description': '99.9% of <redacted> (US) requests return a good HTTP code (2xx, 3xx, 4xx)', 'slo_target': 0.999, 'sli_measurement': 1.0, 'bad_events_count': 0, 'good_events_count': 3567268, 'gap': 0.0010000000000000009, 'error_budget_policy_step_name': 'default', 'error_budget_target': 0.0010000000000000009, 'error_budget_measurement': 0.0, 'error_budget_burn_rate': 0.0, 'error_budget_minutes': 0.06000000000000005, 'error_budget_remaining_minutes': 0.06000000000000005, 'error_minutes': 0.0, 'timestamp': 1642600222, 'timestamp_human': '2022-01-19T13:50:22.501392+00:00', 'window': 3600, 'alert': False, 'consequence_message': 'msg-ok'}
urllib3.connectionpool - DEBUG - https://bigquery.googleapis.com:443 "POST /bigquery/v2/projects/<redacted>/datasets/slo_generator/tables/report-staging/insertAll?prettyPrint=false HTTP/1.1" 200 None

All records seem to have been sent to BigQuery, but you are not finding all of them there ?

from slo-generator.

ocervell avatar ocervell commented on May 5, 2024

Ah, I see the row_ids is not unique. We can set it to None to automatically generate an id, I will make a PR to fix it.

If you can't wait for the fix, you can add the location string into your slo name to make a unique row_ids, like slo_name: availability-asia, slo_name: availability-europe etc...

from slo-generator.

ocervell avatar ocervell commented on May 5, 2024

Will be fixed by #200

from slo-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.