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

APM Sample Data #40704

Closed
graphaelli opened this issue Jul 9, 2019 · 15 comments
Closed

APM Sample Data #40704

graphaelli opened this issue Jul 9, 2019 · 15 comments
Labels
enhancement New value added to drive a business result stale Used to mark issues that were closed for being stale Team:APM All issues that need APM UI Team support

Comments

@graphaelli
Copy link
Member

graphaelli commented Jul 9, 2019

In order to improve the getting started experience, we'd like to add sample data to Kibana to power APM + Infra + Logs so users can get hands on with them. Edit: leave infra/logs/uptime for a follow on effort.

#17807 originally added sample data into Kibana, so could help as a reference for implementation.

Logs UI already supports the sample data index (kibana_sample_data_logs) by default, so populating that index should just work.

Infra UI also includes the logging sample index by default but not one for metrics.

APM UI does not include a sample data index by default. #39741 could fit in nicely to enable that. edit: use an index name that matches the exist pattern

See #40704 (comment) for more implementation details

cc @tbragin @nehaduggal

@graphaelli graphaelli added the Team:APM All issues that need APM UI Team support label Jul 9, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui

@graphaelli graphaelli added [zube]: Inbox enhancement New value added to drive a business result labels Jul 9, 2019
@nreese
Copy link
Contributor

nreese commented Jul 10, 2019

Sample data sets can load multiple Elasticsearch indices so perhaps the existing web logs sample data set could just be enhanced with the indices needed by apm.

@jasonrhodes
Copy link
Member

Perhaps obvious to say but it'd be excellent if the data was planned out so that it looked like it was all connected, so we can demonstrate the interconnected features of our various apps. (That means we also need to be able to easily update it when we add new connections between apps.) Can sample data have dynamic dates applied?

Another reason to consider building a simple data generator to use for dev that could export this kind of data... space time someday!

@nreese
Copy link
Contributor

nreese commented Jul 23, 2019

Can sample data have dynamic dates applied?

Yes. When you install sample data sets, the timestamps identified with timeFields in the schema are shifted into the present.

@jasonrhodes
Copy link
Member

@nreese brilliant! Thanks

@graphaelli
Copy link
Member Author

graphaelli commented Oct 29, 2019

Narrowing the scope on this for now, let's only tackle APM data and tie in logs and metrics connections as a follow on.

The plan is now:

  • Import sample APM data into a new randomly generated index name that matching the default configuration, eg apm-7.4.1-transaction-sample-data-laishjvl
  • Set sample data service.environment to apm-sample-data to clearly distinguish it even when overlapping data is loaded
  • Allow import of sample data from the 'no services' page right in the APM UI
  • Use the same mechanism from the sample data page
  • Stretch goal - drop sample data button. This will phase out over time anyway, would be nice to have.

Open question - can we work backwards from the pattern to a random name that matches? Alternatively, can we warn the user / hide the create sample data flow if the user has modified apm_oss.*Indices?

Per discussion, we do not wish to have a workflow that is special to sample data - eg pass sample data index name around in query params or otherwise.

@nreese
Copy link
Contributor

nreese commented Oct 29, 2019

Import sample APM data into a new randomly generated index name that matching the default configuration, eg apm-7.4.1-transaction-demo-laishjvl

Kibana's sample data implementation prefixes index names with kibana_sample_data_ and then the id of the sample data set

@sorenlouv
Copy link
Member

Kibana's sample data implementation prefixes index names with kibana_sample_data_ and then the id of the sample data set

@nreese Yes we talked about this and agreed it was better to ingest sample data into the APM specific indices. This way the APM app doesn't have to do anything to handle sample data - it's just normal data. It'll still be in a separate index which makes it easy to wipe again.

@sorenlouv
Copy link
Member

sorenlouv commented Oct 29, 2019

can we work backwards from the pattern to a random name that matches?

@graphaelli I don't think so. I think we'll just have to pick an index name eg apm-{version}-transaction-sample-data-{uuid}. If it doesn't match the index (pattern) specified by the user (eg apm-*) I'm okay with either hiding the "Add sample data" button or showing the user a warning.

An alternative approach could be to take advantage of runtime index configuration settings and overwrite them with the sample data index name: apm-{version}-transaction-sample-data-{uuid}.
The (big) downside to this approach is that users will not be able to see anything but sample data until they change their settings. Which probably makes this a show-stopper.
EDIT: clicking the "Delete sample data" button could reset the runtime index configuration indices. This would make it easier to revert back to the defaults.

Stretch goal - drop sample data button. This will phase out over time anyway, would be nice to have.

For us to delete the sample data again we'll need to know the index name. Since the index name is dynamic (contains a uuid) we'll need to store this somewhere (eg. saved objects) when the sample data index is created.

@graphaelli
Copy link
Member Author

I don't think so. I think we'll just have to pick an index name eg apm-{version}-transaction-sample-data-{uuid}

Fair enough. I like the change from demo to sample-data and edited my comment accordingly.

For us to delete the sample data again we'll need to know the index name. Since the index name is dynamic (contains a uuid) we'll need to store this somewhere (eg. saved objects) when the sample data index is created.

I was thinking we would delete apm-{version}-transaction-sample-data-* but I like the idea of being more precise. I think we should still leave this as a stretch goal unless saving that information (probably in saved object, as you noted) is useful otherwise.

@bmorelli25
Copy link
Member

@graphaelli Where is the sample APM data for this project going to come from? Opbeans?

@graphaelli
Copy link
Member Author

That's the plan, planning to pull from one of the kubernetes clusters.

@graphaelli
Copy link
Member Author

graphaelli commented Feb 17, 2020

Spent some time on this

image

: https://github.com/elastic/kibana/compare/356e3a47768701740ae99863f8e0089258874a20...graphaelli:obs-sample-data?expand=1 and have some notes for the implementer:

  • Sample data is intended show off kibana viz/dashboards. I'm concerned that showing prospective users sample dashboards without the curated UIs would be confusing - instead is it straightfowrad to only make the sample obs data available when the Observability curated uis are available? IIUC, the presence of the saved objects indicates that the sample data is already loaded - I expect we can find a workaround for that.
  • Addition of "open in APM App" link wasn't clear, probably b/c i'm out of the legacy/NP loop
  • Sample data indexes are always prefixed kibana_sample_data_ - one workaround would be to create an alias to apm-kibana_sample_data_observability to make it show up in the UI. Alternatively, perhaps a custom index name could be passed in.

I would be happy to continue working on the sample data content if someone could work on wiring all of this up.

@botelastic
Copy link

botelastic bot commented Nov 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the stale Used to mark issues that were closed for being stale label Nov 1, 2021
@graphaelli
Copy link
Member Author

We'll take a different approach as part of the next getting started effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result stale Used to mark issues that were closed for being stale Team:APM All issues that need APM UI Team support
Projects
None yet
Development

No branches or pull requests

6 participants