Skip to content

Conversation

@ritalwar
Copy link
Contributor

@ritalwar ritalwar commented Jan 24, 2025

Proposed commit message

This PR includes the following updates:

  1. Splits the mailbox_usage datastream into two separate datastreams: mailbox_usage_detail and mailbox_usage_quota_status.
  2. Renames the outlook_app_usage datastream to outlook_app_usage_version_counts.
  3. Renames the yammer_device_usage datastream to viva_engage_device_usage_user_counts.
  4. Refactors datastreams to use report_date as the timestamp when available; otherwise, defaults timestamp to report_refresh_date.
  5. Adds fingerprinting over dimension fields to handle duplicates.
  6. Refactors datastreams to explicitly convert fields to long in the pipeline and makes related adjustments.
  7. Updates the Codeowner file.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Related issues

Screenshots

@ritalwar ritalwar added Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] bugfix Pull request that fixes a bug issue Integration:o365_metrics Microsoft Office 365 Metrics labels Jan 24, 2025
@ritalwar ritalwar requested review from a team as code owners January 24, 2025 12:04
@ritalwar ritalwar changed the title Split data stream mailbox_usage into mailbox_usage_detail and mailbox_usage_quota_status_mailbox_counts, and refactor other datastreams. [O365_metrics]Split data stream mailbox_usage into mailbox_usage_detail and mailbox_usage_quota_status_mailbox_counts, and refactor other datastreams. Jan 24, 2025
@ritalwar ritalwar self-assigned this Jan 24, 2025
@lalit-satapathy lalit-satapathy changed the title [O365_metrics]Split data stream mailbox_usage into mailbox_usage_detail and mailbox_usage_quota_status_mailbox_counts, and refactor other datastreams. [O365_metrics]Split refactor other data streams. Jan 28, 2025
@ritalwar ritalwar changed the title [O365_metrics]Split refactor other data streams. [O365_metrics]Split and refactor other data streams. Jan 28, 2025
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

Package o365_metrics 👍(8) 💚(4) 💔(2)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
viva_engage_groups_activity_group_detail 5952.38 4016.06 -1936.32 (-32.53%) 💔
outlook_activity 13888.89 6993.01 -6895.88 (-49.65%) 💔

To see the full report comment with /test benchmark fullreport

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, didn't we decide this interval as 24 hrs ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but we noticed that reports occasionally get refreshed daily, so to prevent any data loss, we decided to call the API twice a day.

@ritalwar ritalwar requested a review from ishleenk17 January 29, 2025 05:27
Copy link
Member

Choose a reason for hiding this comment

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

There is a lot of convert processor usage in the pipelines. Which makes it hard to read.
Is it possible to do this ia script in painless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand, but since not all fields need conversion and the selection is conditional, applying the convert processor selectively was the most feasible approach for now. Using Painless would require more complex logic, but we can definitely explore it for future optimizations.

@muthu-mps
Copy link
Contributor

@ritalwar - When changing the name of the data stream, Is there a reason to keep outlook_app_usage_version_counts instead of outlook_app_usage_versions_user_counts as per the documentation here? As this is versions user count why we are not including the user in the data stream name?

@ritalwar
Copy link
Contributor Author

@ritalwar - When changing the name of the data stream, Is there a reason to keep outlook_app_usage_version_counts instead of outlook_app_usage_versions_user_counts as per the documentation here? As this is versions user count why we are not including the user in the data stream name?

I understand your concern. While we split the datastreams and provided detailed names based on the reports, we also aimed to keep them concise to avoid overly long names. Where possible, we shortened them without losing essential information. The description clearly specifies what each datastream fetches. Similarly, we named data stream mailbox_usage_quota_status instead of mailbox_usage_quota_status_mailbox_counts to keep it clear yet manageable.

@ritalwar ritalwar requested a review from ishleenk17 January 29, 2025 07:05
Copy link
Contributor

@muthu-mps muthu-mps left a comment

Choose a reason for hiding this comment

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

  • For the users who has already installed 0.3.0 might have a different data stream(Viva engage) for yammer device usage data stream while upgrading to newer version. I hope this is okay as the integration is still in Beta.
  • Change looks good to me otherwise!

@elastic-sonarqube
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
68.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine
Copy link

💚 Build Succeeded

History

  • 💚 Build #21164 succeeded 6a73fb8abe8126603f86fd213c0f29601dc812c2
  • 💚 Build #21098 succeeded 3cfacf50b61b0f0e749e18ce632642b8e1a0f424
  • 💔 Build #21095 failed 52df317fb8ac56d189bcab6316f6c10ab9ce29b6
  • 💔 Build #21092 failed eee6b879726d8e718c77c19a836276f862de4317
  • 💔 Build #21064 failed 17efe2a9b898ea63e7ec260fe763a08b7d53cd48
  • 💔 Build #21056 failed b9974d80ade7889fdd8ef44d7b9e1e0e993cfe17

cc @ritalwar

@ritalwar
Copy link
Contributor Author

  • For the users who has already installed 0.3.0 might have a different data stream(Viva engage) for yammer device usage data stream while upgrading to newer version. I hope this is okay as the integration is still in Beta.

Yes, since it's in beta, it's always recommended to use the latest version. Given that version 0.4.0 includes some fixes also as mentioned in the changelog, they should update to it.

Copy link
Member

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

Looks good!

@ritalwar ritalwar merged this pull request into elastic:main Jan 29, 2025
4 of 5 checks passed
@elastic-vault-github-plugin-prod

Package o365_metrics - 0.4.0 containing this change is available at https://epr.elastic.co/package/o365_metrics/0.4.0/

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
@ritalwar ritalwar deleted the o365_split_and_refactor_datastreams branch February 7, 2025 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:o365_metrics Microsoft Office 365 Metrics Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants