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

Metadata file support #130

Open
ttddyy opened this issue Jul 19, 2023 · 5 comments
Open

Metadata file support #130

ttddyy opened this issue Jul 19, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Help on this is appreciated

Comments

@ttddyy
Copy link
Contributor

ttddyy commented Jul 19, 2023

Currently, docs-gen can only generate asciidoc files based on the existing source code files.
To make this project more useful, also as raised in #80, it should support metadata files.

docs-gen project(or else) should do two things:

  • Generate metadata for the current project source-code
  • Generate documentation from metadata

For metadata, it would be something like this:

{
  "name": "spring-framework",
  "spans": [...]
  "metrics": [...]
}

The creation of documentation should be able to specify what groups of metadata to be included/excluded.
For example, a doc is created with all metadata or specific metadata files in the classpath or file system.

Things to consider:

  • Define metadata format
    This could be based on the current model classes(SpanEntry, MetricEntry, ObservationConventionEntry)

  • Hookup the docs-gen to maven and gradle lifecycle
    In order to include the metadata files in the generating jar, the metadata generation needs to happen before jar creation.

  • Allow manual metadata
    Similar to additional-spring-configuration-metadata in Spring Boot, allows users to provide a manual metadata file.

  • Resolve model classes from metadata
    When the' ObservationConvention' class references classes in dependent jars, those jars may have metadata files.
    The referenced model resolution needs to be extended to consider the metadata files in jars in addition to the source files within the project.

  • Metadata inclusion/exclusion
    When generating documents, provide filtering(include/exclude) by jar files(?), metadata name, package, etc.

@ttddyy ttddyy added the enhancement New feature or request label Jul 19, 2023

This comment was marked as outdated.

@brunobat
Copy link

brunobat commented Feb 9, 2024

I want to do this on a custom KeyValues enum:

        /**
         * The method being observed (traced or measured).
         */
        CODE_FUNCTION {
            @Override
            public String asString() {
                return SemanticAttributes.CODE_FUNCTION.getKey();
            }
        }

Right now we need to supply a plain string on the asString method.
This functionality could also benefit from this issue.

@brunobat
Copy link

brunobat commented Feb 9, 2024

@chicobento
Copy link

@ttddyy , thats a great idea, I like it more than what I proposed in #80.
During @jonatan-ivanov @shakuzen session in Spring IO Barcelona someone asked something about dashboards generation. If we have the metadata defined it could also be used in this context.

@shakuzen shakuzen added the help wanted Help on this is appreciated label Jul 18, 2024
@shakuzen
Copy link
Member

I think we're all in agreement this would be a really neat feature with a lot of possible benefits/use. I've marked it as help wanted to indicate we'd be happy to receive help in designing/implementing this. The description talks about a lot of parts, but if someone wants to work on this, it will likely be easier to contribute portions of this at a time so it is easier to review and integrate rather than all at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Help on this is appreciated
Projects
None yet
Development

No branches or pull requests

5 participants