The name must be a valid identifier as specified in the Java language (for
"com.example.Transaction" for an event class or
"message" for an event field).
A stable and easy-to-use event name is of the form:
Events without a
@Name annotation get their name from the fully
qualified class name, which works well for experimentation but should be
avoided in production.
- The name should be stable to avoid breaking setting files and code that consumes or configures the event.
- The name should not contain redundant or unnecessary information such as
- The name should be short, but not so short that it clashes with other organizations or products.
- The name should be easy to understand and remember for users that want to
configure the event. This is especially true if the event is part of a
framework or library that is meant to be used by others. It is usually enough
to put all the events for a library or product in the same namespace. For
example, all the events for OpenJDK are in the
"jdk"namespace, with no sub-namespaces for
"compiler". This avoids unnecessary cognitive load for users. Events can instead be arranged into categories, by using the
@Categoryannotation. Categories can be renamed freely without causing disruption to dependencies
Required Element Summary
valueString valueReturns the name.
- the name