pub fn remove_tags(&mut self, tags: &[&str]) -> Result<()> {
        log::debug!(target: LOG_TAG, "Removing tags");

        // Check that tags are not empty
        if tags.is_empty() {
            return Ok(());
        }

        // Stop Agent
        self.stop();

        // Iterate through every tag
        tags.iter().for_each(|key| {
            // Remove tag
            self.config.tags.remove(key.to_owned());
        });

        // Restart Agent
        self.start();

        Ok(())
    }
/// Remove tags. This will restart the agent.
/// # Example
/// ```ignore
/// # use pyroscope::*;
/// # use std::result;
/// # fn main() -> result::Result<(), error::PyroscopeError> {
/// let agent = PyroscopeAgent::builder("http://localhost:8080", "my-app")
/// .tags(vec![("tag", "value")])
/// .build()?;
/// agent.start()?;
/// // Expensive operation
/// agent.remove_tags(vec!["tag"])?;
/// // Un-Tagged operation
/// agent.stop()?;
/// # Ok(())
/// # }
/// ```
Remove tags. This will restart the agent.
Remove tags . This will restart the agent .
pub fn remove_tags(&mut self, tags: &[&str]) -> Result<()> {
        log::debug!(target: LOG_TAG, "Removing tags");
        // Check that tags are not empty
        if tags.is_empty() {
            return Ok(());
        }
        // Stop Agent
        self.stop();
        // Iterate through every tag
        tags.iter().for_each(|key| {
            // Remove tag
            self.config.tags.remove(key.to_owned());
        });
        // Restart Agent
        self.start();
        Ok(())
    }
pub fn remove_tags ( & mut self , tags : & [ & str ] ) -> Result < ( ) > { log :: debug ! ( target LOG_TAG " " ) ; // Check that tags are not empty if tags . is_empty ( ) { return Ok ( ( ) ) ; } // Stop Agent self . stop ( ) ; // Iterate through every tag tags . iter ( ) . for_each ( | key | { // Remove tag self . config . tags . remove ( key . to_owned ( ) ) ; } ) ; // Restart Agent self . start ( ) ; Ok ( ( ) ) }
Remove tags.
Remove tags .
&mut self
tags
&[&str]
&mut self
tags
&[&str]
example
None
use pyroscope::*;
None
use std::result;
None
fn main() -> result::result<(), error::pyroscopeerror> {
None
ok(())
None
}
None